Function at 0x40724e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 1
dec ecx
mov dword [esp + ecx*4], 0xfffa5a5a
jne 0x407257
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov bl, byte [edi]
mov byte [ebp - 1], bl
cmp dword [0x421f98], 0
je 0x4072e1
mov edi, dword [ebp + 0x10]
cmp edi, 1
je 0x407282
cmp edi, 2
jne 0x4072e1
cmp dword [0x421f7c], 0
jne 0x4072e1
cmp dword [0x421f6c], 0
je 0x40729f
mov edi, dword [ebp + 0x10]
cmp dword [0x421f60], edi
jne 0x4072a8
cmp dword [0x421f78], 0xffffffff
jne 0x4072e1
push dword [0x421f98]
push dword [0x421f98]
push 0xb1
push dword [0x421f2c]
call sub.USER32.DLL_SendMessageA
push 0x43f3be
push 0
push 0xc2
push dword [0x421f2c]
call sub.USER32.DLL_SendMessageA
inc dword [0x421f98]
mov edi, dword [ebp + 0x10]
cmp edi, 1
je 0x407300
cmp edi, 2
je 0x407436
cmp edi, 3
je 0x4074f5
jmp 0x40755d
push dword [0x421f98]
push dword [0x421f98]
push 0xb1
push dword [0x421f2c]
call sub.USER32.DLL_SendMessageA
push dword [0x421f8c]
push dword [0x421f2c]
call fcn.0040712a
add esp, 8
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040717c
add esp, 8
jmp 0x407413
mov edi, dword [ebp + 8]
mov esi, edi
add esi, 1
mov dword [ebp + 8], esi
mov bl, byte [edi]
mov byte [ebp - 1], bl
cmp dword [0x4255bc], 0
je 0x40736b
movzx ebx, byte [ebp - 1]
movsx ebx, byte [ebx + 0x4252a8]
mov byte [ebp - 1], bl
cmp dword [0x4684fc], 0
jle 0x4073cd
cmp dword [0x43e9d0], 0
je 0x4073aa
cmp dword [0x4684e4], 0
je 0x407399
lea edi, [ebp - 1]
push edi
push 1
call fcn.00405b41
add esp, 8
cmp eax, 0
jne 0x407413
push str._nTimeout_
push 0
call fcn.00406e00
add esp, 8
jmp 0x407413
movsx ebx, byte [ebp - 1]
push ebx
call fcn.004051e5
add esp, 4
cmp eax, 1
je 0x407413
push str._nTimeout_CTS_
push 0
call fcn.00406e00
add esp, 8
jmp 0x407413
cmp dword [0x4264ac], 0
jl 0x407413
push 0
mov edi, dword [0x4264ac]
shl edi, 7
lea edi, [edi + 0x42a128]
push edi
call sub.USER32.DLL_FindWindowA
mov dword [0x421f18], eax
cmp eax, 0
je 0x407413
push dword [0x421f28]
movzx ebx, byte [ebp - 1]
push ebx
push 0x401
push dword [0x421f18]
call sub.USER32.DLL_PostMessageA
mov edi, dword [ebp + 0xc]
mov esi, edi
sub esi, 1
mov dword [ebp + 0xc], esi
cmp edi, 0
jne 0x407343
mov dword [0x421f60], 1
jmp 0x40755d
mov edi, dword [0x421f98]
add edi, 1
push edi
push dword [0x421f98]
push 0xb1
push dword [0x421f2c]
call sub.USER32.DLL_SendMessageA
push dword [0x421f90]
push dword [0x421f2c]
call fcn.0040712a
add esp, 8
cmp dword [0x42529c], 0
je 0x407489
push dword [0x42529c]
push dword [ebp + 0xc]
push 1
push dword [ebp + 8]
call sub.CRTDLL.DLL_fwrite
add esp, 0x10
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040717c
add esp, 8
push dword [0x421f98]
push dword [0x421f98]
push 0xb1
push dword [0x421f2c]
call sub.USER32.DLL_SendMessageA
mov dword [0x421f60], 2
cmp dword [0x43ad64], 0
je 0x40755d
jmp 0x4074e3
mov edi, dword [ebp + 8]
mov esi, edi
add esi, 1
mov dword [ebp + 8], esi
movzx ebx, byte [edi]
push ebx
call fcn.00408eb5
add esp, 4
mov edi, dword [ebp + 0xc]
mov esi, edi
sub esi, 1
mov dword [ebp + 0xc], esi
cmp edi, 0
jne 0x4074cc
jmp 0x40755d
mov edi, dword [0x421f98]
add edi, 1
push edi
push dword [0x421f98]
push 0xb1
push dword [0x421f2c]
call sub.USER32.DLL_SendMessageA
push dword [0x421f94]
push dword [0x421f2c]
call fcn.0040712a
add esp, 8
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040717c
add esp, 8
push dword [0x421f98]
push dword [0x421f98]
push 0xb1
push dword [0x421f2c]
call sub.USER32.DLL_SendMessageA
mov dword [0x421f60], 3
push 0
push 7
push 0x115
push dword [0x421f2c]
call sub.USER32.DLL_SendMessageA
mov edi, dword [0x421f74]
mov dword [0x421f78], edi
pop edi
pop esi
pop ebx
leave
ret