Function at 0x4059c0
Capabilities:
Delete file
Write file on windows

Disassembly:
sub esp, 0x7d8
mov eax, dword [0x40e018]
xor eax, esp
mov dword [esp + 0x7d4], eax
mov ecx, dword [0x40fdcc]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
add eax, eax
push ebx
push esi
push edi
mov edx, ecx
sub edx, eax
push edx
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x64
mov edx, ecx
sub edx, eax
mov eax, 0x66666667
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x3e8
mov edx, ecx
sub edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x68db8bad
imul ecx
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x2710
mov edx, ecx
sub edx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x14f8b589
imul ecx
sar edx, 0xd
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x186a0
sub ecx, eax
mov eax, 0x68db8bad
imul ecx
sar edx, 0xc
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push str._d_d_d_d_d.DAT
lea edx, [esp + 0x28]
push edx
mov edi, dword [sym.imp.MSVCR90.dll_sprintf]
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
add esp, 0x1c
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea eax, [esp + 0x28]
push eax
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x405d4e
mov ecx, esi
call fcn.004062f0
push esi
test eax, eax
je 0x405d48
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x405d4e
push ebp
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [0x40fdd0]
mov ebp, dword [0x40fdc8]
mov eax, 0x64
cdq
sub ebp, esi
idiv ebp
mov ecx, dword [0x40fdcc]
mov edx, dword [0x40fdb0]
inc ecx
mov dword [0x40fdcc], ecx
sub ecx, esi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push 0
imul eax, ecx
push eax
mov eax, dword [edx + 0x178]
push 0x402
push eax
call esi
mov ecx, dword [0x40fdc8]
pop ebp
cmp ecx, dword [0x40fdcc]
jne 0x405c2b
mov edx, dword [0x40fdb0]
mov eax, dword [edx + 0x178]
push 0
push 0x64
push 0x402
push eax
call esi
mov ecx, dword [0x40fdb0]
push 0
add ecx, 0x37c
call sub.mfc90.dll_Ordinal_6584
mov ecx, dword [0x40fdb0]
push 1
add ecx, 0x1ac
call sub.mfc90.dll_Ordinal_6584
mov ecx, dword [0x40fdc8]
mov edx, dword [0x40fdcc]
push ecx
push edx
lea eax, [esp + 0x400]
push 0x40afa8
push eax
call edi
mov ecx, dword [0x40fdb0]
add esp, 0x10
push 0
add ecx, 0x498
call sub.mfc90.dll_Ordinal_6584
lea ecx, [esp + 0x3f8]
push ecx
mov ecx, dword [0x40fdb0]
add ecx, 0x498
call sub.mfc90.dll_Ordinal_6559
mov ecx, dword [0x40fdb0]
push 1
add ecx, 0x498
call sub.mfc90.dll_Ordinal_6584
mov ecx, dword [0x40fdb0]
push 0
add ecx, 0x3f0
call sub.mfc90.dll_Ordinal_6584
mov ecx, dword [0x40fdb0]
push 1
add ecx, 0x444
call sub.mfc90.dll_Ordinal_6584
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push str.PRESENTVERSION.DAT
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x405d4e
mov ecx, dword [0x40fdcc]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
add edx, edx
mov eax, ecx
sub eax, edx
push eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x64
mov edx, ecx
sub edx, eax
mov eax, 0x66666667
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x3e8
mov edx, ecx
sub edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x68db8bad
imul ecx
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x2710
mov edx, ecx
sub edx, eax
mov eax, 0x10624dd3
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x14f8b589
imul ecx
sar edx, 0xd
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x186a0
sub ecx, eax
mov eax, 0x68db8bad
imul ecx
sar edx, 0xc
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
lea edx, [esp + 0x24]
push str._d_d_d_d_d
push edx
call edi
add esp, 0x1c
push 0
lea eax, [esp + 0x10]
push eax
push 5
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
test eax, eax
jne 0x405d68
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x7d4]
xor ecx, esp
call fcn.004076cc
add esp, 0x7d8
ret
cmp dword [esp + 0x10], 5
jne 0x405d48
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x7e0]
pop edi
neg eax
pop esi
sbb eax, eax
pop ebx
xor ecx, esp
neg eax
call fcn.004076cc
add esp, 0x7d8
ret