Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global main
- extern __mingw_vfscanf
- extern __mingw_vfprintf
- extern __main
- extern __imp___acrt_iob_func
- SECTION .text
- .text:
- printf: push rsi
- push rbx
- mov rbx, rcx
- mov ecx, 1
- sub rsp, 56
- lea rsi, [rsp+58H]
- mov qword [rsp+58H], rdx
- mov qword [rsp+60H], r8
- mov qword [rsp+68H], r9
- mov qword [rsp+28H], rsi
- call near [rel __imp___acrt_iob_func]
- mov r8, rsi
- mov rdx, rbx
- mov rcx, rax
- call __mingw_vfprintf
- add rsp, 56
- pop rbx
- pop rsi
- ret
- ALIGN 16
- scanf.constprop.0:
- push rbx
- xor ecx, ecx
- sub rsp, 48
- lea rbx, [rsp+48H]
- mov qword [rsp+48H], rdx
- mov qword [rsp+50H], r8
- mov qword [rsp+58H], r9
- mov qword [rsp+28H], rbx
- call near [rel __imp___acrt_iob_func]
- mov r8, rbx
- lea rdx, [rel ?_001]
- mov rcx, rax
- call __mingw_vfscanf
- add rsp, 48
- pop rbx
- ret
- nop
- nop
- SECTION .data
- SECTION .bss
- SECTION .rdata
- ?_001:
- db 25H, 64H, 00H
- ?_002:
- db 49H, 6EH, 74H, 72H, 6FH, 64H, 75H, 7AH
- db 63H, 61H, 20H, 75H, 6EH, 20H, 6EH, 0C3H
- db 0BAH, 6DH, 65H, 72H, 6FH, 3AH, 20H, 00H
- db 00H, 00H, 00H, 00H, 00H
- ?_003:
- db 45H, 6CH, 20H, 6EH, 0C3H, 0BAH, 6DH, 65H
- db 72H, 6FH, 20H, 64H, 65H, 62H, 65H, 20H
- db 73H, 65H, 72H, 20H, 70H, 6FH, 73H, 69H
- db 74H, 69H, 76H, 6FH, 2EH, 0AH, 00H
- ?_004:
- db 45H, 6CH, 20H, 66H, 61H, 63H, 74H, 6FH
- db 72H, 69H, 61H, 6CH, 20H, 64H, 65H, 20H
- db 25H, 64H, 20H, 65H, 73H, 3AH, 20H, 25H
- db 2EH, 30H, 66H, 0AH, 00H, 00H, 00H, 00H
- db 00H
- ?_005: dq 3FF0000000000000H
- dq 0000000000000000H
- SECTION .text.startup
- .text.startup:
- main:
- sub rsp, 56
- call __main
- lea rcx, [rel ?_002]
- call printf
- lea rdx, [rsp+2CH]
- lea rcx, [rel ?_001]
- call scanf.constprop.0
- mov edx, dword [rsp+2CH]
- test edx, edx
- js ?_009
- movsd xmm2, qword [rel ?_005]
- mov eax, edx
- jz ?_007
- ALIGN 8
- ?_006: pxor xmm0, xmm0
- cvtsi2sd xmm0, eax
- mulsd xmm2, xmm0
- sub eax, 1
- jnz ?_006
- ?_007: movq r8, xmm2
- lea rcx, [rel ?_004]
- call printf
- xor eax, eax
- ?_008: add rsp, 56
- ret
- ?_009:
- lea rcx, [rel ?_003]
- call printf
- mov eax, 1
- jmp ?_008
- nop
- nop
- nop
- nop
- SECTION .rdata$zzz
- db 47H, 43H, 43H, 3AH, 20H, 28H, 52H, 65H
- db 76H, 36H, 2CH, 20H, 42H, 75H, 69H, 6CH
- db 74H, 20H, 62H, 79H, 20H, 4DH, 53H, 59H
- db 53H, 32H, 20H, 70H, 72H, 6FH, 6AH, 65H
- db 63H, 74H, 29H, 20H, 31H, 33H, 2EH, 31H
- db 2EH, 30H, 00H, 00H, 00H, 00H, 00H, 00H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement