Function at 0x409b31
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4a5de8
call fcn.004817b4
sub esp, 0x420
push ebx
push esi
push edi
mov esi, ecx
push 0x4030
call fcn.0049b33f
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 0
mov ebx, eax
push 0
push 0x402
mov dword [ebp - 0x28], ebx
push dword [ebx + 0x1c]
call edi
push dword [ebp + 8]
push 0
push 0x406
push dword [ebx + 0x1c]
call edi
and dword [ebp - 0x14], 0
and dword [ebp - 0x20], 0
mov ecx, esi
call fcn.004095c2
test al, al
jne 0x409dab
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x42c]
push 0x400
push eax
push dword [esi + 0x60]
call dword [0x4deaa0]
test eax, eax
mov eax, dword [0x4dbfc4]
je 0x409db2
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], 1
test eax, eax
je 0x409bf9
mov ecx, dword [ebp + 0xc]
add dword [ebp - 0x14], eax
push 0
add dword [ecx], eax
lea ecx, [ebp - 0x2c]
push ecx
push eax
lea eax, [ebp - 0x42c]
push eax
push dword [esi + 0x68]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x409df5
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x1c]
jne 0x409df5
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [esi + 0x90]
xor edx, edx
mov ecx, 0x3e8
div ecx
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x409c1f
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jbe 0x409d90
cmp dword [ebp + 8], 0
mov dword [ebp - 0x20], eax
je 0x409c6d
push 0
push dword [ebp - 0x14]
push 0x402
push dword [ebx + 0x1c]
call edi
mov eax, dword [ebp - 0x14]
xor edx, edx
imul eax, eax, 0x64
div dword [ebp + 8]
push eax
mov eax, dword [ebp + 8]
shr eax, 0xa
push eax
mov eax, dword [ebp - 0x14]
shr eax, 0xa
push eax
lea eax, [ebp - 0x10]
push str._d_KB_of__d_KB___d___
push eax
call fcn.00496574
add esp, 0x14
jmp 0x409c85
mov eax, dword [ebp - 0x14]
shr eax, 0xa
push eax
lea eax, [ebp - 0x10]
push str._d_KB
push eax
call fcn.00496574
add esp, 0xc
push dword [ebp - 0x10]
mov ecx, esi
push 0x4034
call fcn.0049b369
cmp dword [ebp + 8], 0
je 0x409cd2
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x409cd2
mov eax, dword [ebp + 0xc]
xor edx, edx
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
imul eax, eax, 0x64
div ecx
shr ecx, 0xa
push eax
mov eax, dword [ebp - 0x24]
shr eax, 0xa
push ecx
push eax
lea eax, [ebp - 0x10]
push str._d_KB_of__d_KB___d___
push eax
call fcn.00496574
add esp, 0x14
jmp 0x409cec
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
shr eax, 0xa
push eax
lea eax, [ebp - 0x10]
push str._d_KB
push eax
call fcn.00496574
add esp, 0xc
mov eax, dword [ebp - 0x18]
push 0x3c
xor edx, edx
pop ecx
div ecx
mov eax, dword [ebp - 0x18]
push edx
xor edx, edx
div ecx
xor edx, edx
div ecx
mov eax, dword [ebp - 0x18]
mov ecx, 0xe10
push edx
xor edx, edx
div ecx
push eax
lea eax, [ebp - 0x10]
push str._d:_02d:_02d
push eax
call fcn.00496574
add esp, 0x14
cmp dword [ebp + 8], 0
je 0x409d90
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x409d90
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
test ecx, ecx
jbe 0x409d90
mul dword [ebp - 0x18]
push 0
push ecx
push edx
push eax
call fcn.00483750
mov ecx, eax
push 0x3c
sub ecx, dword [ebp - 0x18]
xor edx, edx
pop ebx
mov eax, ecx
div ebx
mov eax, ecx
push edx
xor edx, edx
div ebx
xor edx, edx
div ebx
mov eax, ecx
mov ecx, 0xe10
push edx
xor edx, edx
div ecx
push eax
lea eax, [ebp - 0x10]
push str._d:_02d:_02d
push eax
call fcn.00496574
add esp, 0x14
mov ecx, esi
push dword [ebp - 0x10]
push 0x4031
call fcn.0049b369
mov ebx, dword [ebp - 0x28]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0049bdde
cmp dword [ebp - 0x1c], 0
jbe 0x409e64
jmp 0x409b80
xor al, al
jmp 0x409e9d
mov dword [ebp + 8], eax
and dword [ebp - 4], 0
push str.wininet.dll
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
lea eax, [ebp + 8]
push eax
mov ecx, esi
call fcn.004095e6
push dword [ebp + 8]
lea ecx, [esi + 0x7c]
push 0x4d01d0
call fcn.00495ebc
mov ecx, esi
call fcn.004095d2
mov ecx, dword [ebp + 0x14]
or dword [ebp - 4], 0xffffffff
mov dword [ecx], eax
lea ecx, [ebp + 8]
jmp 0x409e5b
mov eax, dword [0x4dbfc4]
mov dword [ebp + 0xc], eax
push 0
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
lea eax, [ebp + 0xc]
push eax
mov ecx, esi
call fcn.004095e6
mov eax, dword [ebp + 0x18]
lea edi, [esi + 0x7c]
add eax, 0x104
mov ecx, edi
push eax
push 0x4d01d0
call fcn.00495ebc
push dword [ebp + 0xc]
mov ecx, edi
push 0x4d0e18
call fcn.00495ebc
mov ecx, esi
call fcn.004095d2
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 4], 1
mov dword [ecx], eax
lea ecx, [ebp + 0xc]
call fcn.0049bdde
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0049bdde
xor al, al
jmp 0x409ea3
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi + 0x8c]
push eax
push 0
push 0x406
mov dword [ecx + 0x30c], eax
push dword [ebx + 0x1c]
call edi
push 0
push dword [ebp - 0x14]
push 0x402
push dword [ebx + 0x1c]
call edi
mov ecx, esi
call fcn.0040975f
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov al, 1
mov ecx, dword [ebp + 0x14]
and dword [ecx], 0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14