Function at 0x418840
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x344
mov eax, dword [0x472cf0]
xor eax, esp
mov dword [esp + 0x340], eax
mov eax, dword [esp + 0x348]
test eax, eax
push esi
mov esi, dword [esp + 0x354]
jne 0x418871
mov eax, 0x10000
jmp 0x418b20
cmp dword [eax], 1
je 0x418880
mov eax, 0x80000
jmp 0x418b20
push ebx
push ebp
push edi
mov edi, dword [eax + 4]
or ebx, 0xffffffff
cmp dword [edi + 4], ebx
je 0x418899
mov eax, dword [edi]
push eax
call fcn.004162c0
add esp, 4
mov eax, dword [edi]
mov ebp, dword [esp + 0x35c]
mov dword [edi + 4], ebx
cmp ebp, dword [eax + 4]
jl 0x4188b4
mov eax, 0x10000
jmp 0x418b1d
cmp ebp, dword [eax + 0x10]
jge 0x4188c2
push eax
call fcn.00416010
add esp, 4
mov ecx, dword [edi]
cmp dword [ecx + 0x10], ebp
jge 0x4188e2
lea esp, [esp]
mov edx, dword [edi]
push edx
call fcn.00416060
mov eax, dword [edi]
add esp, 4
cmp dword [eax + 0x10], ebp
jl 0x4188d0
lea ecx, [esp + 0x1c]
push ecx
push ebp
mov ecx, edi
call fcn.00416430
test byte [esp + 0x124], 0x10
mov al, byte [esi]
je 0x418936
cmp al, 0x2f
je 0x41890d
cmp al, 0x5c
je 0x41890d
test al, al
je 0x41891f
cmp byte [esi + 1], 0x3a
jne 0x41891f
push esi
push 0
call fcn.00416970
add esp, 8
xor eax, eax
jmp 0x418b1d
push esi
add edi, 0x140
push edi
call fcn.00416970
add esp, 8
xor eax, eax
jmp 0x418b1d
test al, al
mov ebp, esi
mov ecx, esi
je 0x418955
mov edi, edi
cmp al, 0x2f
je 0x418948
cmp al, 0x5c
jne 0x41894b
lea ebp, [ecx + 1]
mov al, byte [ecx + 1]
add ecx, 1
test al, al
jne 0x418940
lea edx, [esp + 0x148]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x418960
cmp ebp, esi
jne 0x4189de
mov byte [esp + 0x148], cl
push ebp
lea eax, [esp + 0x14c]
push eax
lea esi, [edi + 0x140]
push esi
lea ecx, [esp + 0x258]
push 0x46039c
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x15c]
push edx
push esi
call fcn.00416970
add esp, 0x1c
mov eax, dword [esp + 0x124]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [esp + 0x264]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, ebx
jne 0x418a42
mov eax, 0x200
jmp 0x418b1d
mov edx, ebp
sub edx, esi
mov byte [esp + edx + 0x148], 0
mov al, byte [esp + 0x148]
cmp al, 0x2f
je 0x418a0f
cmp al, 0x5c
je 0x418a0f
test al, al
je 0x418977
cmp byte [esp + 0x149], 0x3a
jne 0x418977
push ebp
lea eax, [esp + 0x14c]
push eax
lea ecx, [esp + 0x254]
push 0x460394
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x158]
push edx
push 0
call fcn.00416970
add esp, 0x18
jmp 0x4189ab
mov edx, dword [edi + 0x138]
mov eax, dword [edi]
push edx
push eax
call fcn.00418230
add esp, 8
cmp dword [edi + 0x13c], 0
jne 0x418a70
push 0x4000
call fcn.0041d9ab
add esp, 4
mov dword [edi + 0x13c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x14], 0
mov edi, edi
mov edx, dword [edi + 0x13c]
mov eax, dword [edi]
lea ecx, [esp + 0x13]
push ecx
push 0x4000
push edx
push eax
call fcn.004183c0
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x418ad4
test esi, esi
jl 0x418aca
jle 0x418abf
mov edx, dword [edi + 0x13c]
push 0
lea ecx, [esp + 0x1c]
push ecx
push esi
push edx
push ebp
call ebx
test eax, eax
je 0x418ade
cmp byte [esp + 0x13], 0
jne 0x418ae8
test esi, esi
jne 0x418a80
mov dword [esp + 0x14], 0x5000000
jmp 0x418b07
mov dword [esp + 0x14], 0x1000
jmp 0x418b07
mov dword [esp + 0x14], 0x400
jmp 0x418b07
lea eax, [esp + 0x138]
push eax
lea ecx, [esp + 0x12c]
push ecx
lea edx, [esp + 0x138]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi]
push eax
call fcn.004162c0
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x344]
pop esi
xor ecx, esp
mov dword [0x474c2c], eax
call fcn.0043a2e3
add esp, 0x344
ret