Function at 0x408a90
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x340
push ebx
mov ebx, dword [esp + 0x354]
push ebp
push esi
cmp ebx, 3
push edi
mov esi, ecx
je 0x408acc
cmp ebx, 2
je 0x408bc9
cmp ebx, 1
je 0x408bc9
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x340
ret 0x10
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x354]
cmp edi, eax
je 0x408b44
cmp eax, 0xffffffff
je 0x408aea
mov eax, dword [esi]
push eax
call fcn.00408180
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jl 0x408b0a
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x340
ret 0x10
cmp edi, dword [eax + 0x10]
jge 0x408b18
push eax
call fcn.00407950
add esp, 4
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x408b2f
push eax
call fcn.004079a0
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x408b1f
mov ecx, dword [esi + 0x138]
mov edx, dword [esi]
push ecx
push edx
call fcn.00407d10
add esp, 8
mov dword [esi + 4], edi
mov ecx, dword [esp + 0x35c]
mov edx, dword [esp + 0x358]
lea eax, [esp + 0x13]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call fcn.00407ec0
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x408b7c
mov ecx, dword [esi]
push ecx
call fcn.00408180
add esp, 4
mov dword [esi + 4], 0xffffffff
mov al, byte [esp + 0x13]
test al, al
je 0x408b93
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x340
ret 0x10
test edi, edi
jle 0x408ba9
pop edi
pop esi
pop ebp
mov eax, 0x600
pop ebx
add esp, 0x340
ret 0x10
mov eax, edi
pop edi
sub eax, 0xffffff96
pop esi
neg eax
sbb eax, eax
pop ebp
and eax, 0x4fff000
pop ebx
add eax, 0x1000
add esp, 0x340
ret 0x10
mov eax, dword [esi + 4]
or edi, 0xffffffff
cmp eax, edi
je 0x408bde
mov edx, dword [esi]
push edx
call fcn.00408180
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x354]
cmp edi, dword [eax + 4]
jl 0x408c01
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x340
ret 0x10
cmp edi, dword [eax + 0x10]
jge 0x408c0f
push eax
call fcn.00407950
add esp, 4
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x408c26
push eax
call fcn.004079a0
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x408c16
lea eax, [esp + 0x120]
mov ecx, esi
push eax
push edi
call fcn.004082f0
mov ecx, dword [esp + 0x228]
shr ecx, 4
test cl, 1
je 0x408cad
cmp ebx, 1
jne 0x408c59
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x340
ret 0x10
mov ecx, dword [esp + 0x358]
mov al, byte [ecx]
cmp al, 0x2f
je 0x408c74
cmp al, 0x5c
je 0x408c74
test al, al
je 0x408c8e
cmp byte [ecx + 1], 0x3a
jne 0x408c8e
push ecx
push 0
call fcn.00408930
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret 0x10
add esi, 0x140
push ecx
push esi
call fcn.00408930
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret 0x10
cmp ebx, 1
mov byte [esp + 0x24c], 0
jne 0x408cc6
mov ebp, dword [esp + 0x358]
jmp 0x408d5a
mov edi, dword [esp + 0x358]
mov ebx, edi
mov ecx, edi
mov al, byte [edi]
test al, al
je 0x408cea
cmp al, 0x2f
je 0x408cdf
cmp al, 0x5c
jne 0x408ce2
lea ebx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x408cd7
push 0x104
lea edx, [esp + 0x20]
push edi
push edx
call dword [sym.imp.MSVCRT.dll__mbsnbcpy]
add esp, 0xc
cmp ebx, edi
jne 0x408d71
mov byte [esp + 0x1c], 0
lea ecx, [esp + 0x1c]
lea edi, [esi + 0x140]
push ebx
push ecx
push edi
lea edx, [esp + 0x258]
push str._s_s_s
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x30]
push eax
push edi
call fcn.00408930
add esp, 0x1c
mov ecx, dword [esp + 0x228]
push 0
push ecx
push 2
push 0
push 0
lea edx, [esp + 0x260]
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x408dc6
pop edi
pop esi
pop ebp
mov eax, 0x200
pop ebx
add esp, 0x340
ret 0x10
mov eax, ebx
sub eax, edi
mov byte [esp + eax + 0x1c], 0
mov al, byte [esp + 0x1c]
cmp al, 0x2f
je 0x408d99
cmp al, 0x5c
je 0x408d99
test al, al
je 0x408d07
cmp byte [esp + 0x1d], 0x3a
jne 0x408d07
lea ecx, [esp + 0x1c]
push ebx
push ecx
lea edx, [esp + 0x254]
push 0x414510
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x2c]
push eax
push 0
call fcn.00408930
add esp, 0x18
jmp 0x408d35
mov eax, dword [esi + 0x138]
mov ecx, dword [esi]
push eax
push ecx
call fcn.00407d10
mov eax, dword [esi + 0x13c]
add esp, 8
test eax, eax
jne 0x408df5
push 0x4000
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esi + 0x13c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x14], 0
mov eax, dword [esi + 0x13c]
mov ecx, dword [esi]
lea edx, [esp + 0x13]
push edx
push 0x4000
push eax
push ecx
call fcn.00407ec0
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x408e50
test edi, edi
jl 0x408e64
jle 0x408e42
mov eax, dword [esi + 0x13c]
lea edx, [esp + 0x18]
push 0
push edx
push edi
push eax
push ebp
call ebx
test eax, eax
je 0x408e5a
mov al, byte [esp + 0x13]
test al, al
jne 0x408e6c
test edi, edi
je 0x408e64
jmp 0x408e03
mov dword [esp + 0x14], 0x1000
jmp 0x408e6c
mov dword [esp + 0x14], 0x400
jmp 0x408e6c
mov dword [esp + 0x14], 0x5000000
mov ecx, dword [esi]
push ecx
call fcn.00408180
mov esi, dword [esp + 0x18]
add esp, 4
test esi, esi
jne 0x408e9e
lea edx, [esp + 0x23c]
lea eax, [esp + 0x22c]
push edx
lea ecx, [esp + 0x238]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x360], 1
je 0x408eaf
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret 0x10