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

Disassembly:
sub esp, 0x7d8
mov eax, dword [0x40d018]
xor eax, esp
mov dword [esp + 0x7d4], eax
mov ecx, dword [0x40edbc]
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 0x404cbe
mov ecx, esi
call fcn.00405260
push esi
test eax, eax
je 0x404cb8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x404cbe
push ebp
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [0x40edc0]
mov ebp, dword [0x40edb8]
mov eax, 0x64
cdq
sub ebp, esi
idiv ebp
mov ecx, dword [0x40edbc]
mov edx, dword [0x40eda0]
inc ecx
mov dword [0x40edbc], 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 [0x40edb8]
pop ebp
cmp ecx, dword [0x40edbc]
jne 0x404b9b
mov edx, dword [0x40eda0]
mov eax, dword [edx + 0x178]
push 0
push 0x64
push 0x402
push eax
call esi
mov ecx, dword [0x40eda0]
push 0
add ecx, 0x37c
call sub.mfc90.dll_Ordinal_6584
mov ecx, dword [0x40eda0]
push 1
add ecx, 0x1ac
call sub.mfc90.dll_Ordinal_6584
mov ecx, dword [0x40edb8]
mov edx, dword [0x40edbc]
push ecx
push edx
lea eax, [esp + 0x400]
push 0x409f88
push eax
call edi
mov ecx, dword [0x40eda0]
add esp, 0x10
push 0
add ecx, 0x498
call sub.mfc90.dll_Ordinal_6584
lea ecx, [esp + 0x3f8]
push ecx
mov ecx, dword [0x40eda0]
add ecx, 0x498
call sub.mfc90.dll_Ordinal_6559
mov ecx, dword [0x40eda0]
push 1
add ecx, 0x498
call sub.mfc90.dll_Ordinal_6584
mov ecx, dword [0x40eda0]
push 0
add ecx, 0x3f0
call sub.mfc90.dll_Ordinal_6584
mov ecx, dword [0x40eda0]
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 0x404cbe
mov ecx, dword [0x40edbc]
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 0x404cd8
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.00406768
add esp, 0x7d8
ret
cmp dword [esp + 0x10], 5
jne 0x404cb8
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.00406768
add esp, 0x7d8
ret