Function at 0x404490
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x52c
mov eax, dword [0x428510]
xor eax, esp
mov dword [esp + 0x528], eax
push ebx
push esi
mov esi, dword [esp + 0x538]
mov ecx, esi
mov dword [esp + 8], 1
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4044c0
sub ecx, edx
lea eax, [ecx + 1]
push eax
call fcn.0040b4fc
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4044fc
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x528]
xor ecx, esp
call fcn.00404cba
add esp, 0x52c
ret
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404501
sub ecx, edx
push ebp
lea eax, [ecx + 0x80]
push eax
call fcn.0040b4fc
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40454b
push ebx
call fcn.0040b4e1
add esp, 4
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebp
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x528]
xor ecx, esp
call fcn.00404cba
add esp, 0x52c
ret
mov ecx, ebx
sub ecx, esi
nop
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x404550
cmp dword [0x428e34], 0
je 0x4047f1
cmp dword [0x428e38], 0
je 0x40457e
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
lea ecx, [esp + 0x234]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x230]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4045a4
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
sub ecx, edx
push edi
cmp ecx, 0x104
ja 0x40467e
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x33c]
push eax
lea eax, [esp + 0x440]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x244]
push eax
call fcn.0040b751
lea edx, [esp + 0x34c]
add esp, 0x14
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4045f4
sub edx, ecx
lea ecx, [esp + 0x2c]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404604
sub ecx, esi
lea eax, [ecx + 1]
add eax, edx
cmp eax, 0x104
ja 0x404678
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [esp + ecx + 0x14]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x2b], al
test al, al
jne 0x404620
lea edx, [esp + 0x438]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x404638
lea edi, [esp + 0x2c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404646
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404663
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
sub ecx, edx
mov byte [esp + ecx + 0x2b], al
jmp 0x404682
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x57
call esi
lea edi, [esp + 0x2c]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404687
mov ax, word [0x41d734]
lea ecx, [esp + 0x2c]
mov word [edi], ax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4046a1
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jbe 0x4046ba
push 0x57
call esi
jmp 0x4046d2
xor ecx, ecx
nop dword [eax]
mov al, byte [esp + ecx + 0x2c]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x12f], al
test al, al
jne 0x4046c0
lea ecx, [esp + 0x130]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4046e0
sub ecx, edx
mov edx, 0x428e40
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4046f1
sub edx, esi
lea eax, [edx + 1]
add eax, ecx
cmp eax, 0x104
jbe 0x404713
mov dword [esp + 0x10], 0
jmp 0x4047f0
mov edx, 0x428e40
mov esi, edx
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x404720
lea edi, [esp + 0x130]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404731
mov ecx, edx
lea eax, [esp + 0x130]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0
push 0
push 4
push 0
push 1
mov ecx, edx
and ecx, 3
push 0x40000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4047f0
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x428e38], 0
push ebx
je 0x4047ba
movzx eax, word [esp + 0x2c]
push eax
movzx eax, word [esp + 0x2e]
push eax
movzx eax, word [esp + 0x30]
push eax
movzx eax, word [esp + 0x32]
push eax
movzx eax, word [esp + 0x32]
push eax
movzx eax, word [esp + 0x34]
push eax
push str._04d__02d__02d__02d:_02d:_02d___s_r_n
push ebp
call fcn.004032d0
add esp, 0x24
jmp 0x4047c8
push str._s_r_n
push ebp
call fcn.004032d0
add esp, 0xc
mov ecx, ebp
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4047d0
push 0
lea eax, [esp + 0x1c]
sub ecx, edx
push eax
push ecx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
push ebx
call fcn.0040b4e1
push ebp
call fcn.0040b4e1
mov ecx, dword [esp + 0x53c]
add esp, 8
mov eax, dword [esp + 0xc]
pop ebp
pop esi
pop ebx
xor ecx, esp
call fcn.00404cba
add esp, 0x52c
ret