Function at 0x408b6c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
mov eax, dword [0x456d70]
push ebx
mov ebx, dword [ebp + 0x14]
cmp ebx, 3
push esi
mov dword [ebp - 4], eax
push edi
mov esi, ecx
je 0x408ba6
cmp ebx, 2
je 0x408c4e
cmp ebx, 1
je 0x408c4e
mov eax, 0x10000
jmp 0x408ebd
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x408bf5
cmp eax, 0xffffffff
je 0x408bbd
push dword [esi]
call fcn.00405632
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x408b9c
cmp edi, dword [eax + 0x10]
jge 0x408bdd
push eax
call fcn.004053f4
jmp 0x408bdc
push dword [esi]
call fcn.00405432
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x408bd5
push dword [esi + 0x138]
push eax
call fcn.00408735
pop ecx
pop ecx
mov dword [esi + 4], edi
lea eax, [ebp + 0xf]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi]
call fcn.00408895
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x408c1b
push dword [esi]
call fcn.00405632
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp + 0xf], 0
je 0x408c28
xor eax, eax
jmp 0x408ebd
test edi, edi
jle 0x408c36
mov eax, 0x600
jmp 0x408ebd
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x408ebd
cmp dword [esi + 4], 0xffffffff
je 0x408c5c
push dword [esi]
call fcn.00405632
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 8]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x408b9c
cmp edi, dword [eax + 0x10]
jge 0x408c83
push eax
call fcn.004053f4
jmp 0x408c82
push dword [esi]
call fcn.00405432
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x408c7b
lea eax, [ebp - 0x234]
push eax
push edi
mov ecx, esi
call fcn.004057a3
test byte [ebp - 0x12c], 0x10
je 0x408cdc
cmp ebx, 1
je 0x408c21
mov ecx, dword [ebp + 0xc]
mov al, byte [ecx]
cmp al, 0x2f
je 0x408cc2
cmp al, 0x5c
je 0x408cc2
test al, al
je 0x408cc7
cmp byte [ecx + 1], 0x3a
jne 0x408cc7
push ecx
push 0
jmp 0x408ccf
push ecx
add esi, 0x140
push esi
call fcn.00405c1a
pop ecx
xor eax, eax
jmp 0x408ebc
cmp ebx, 1
jne 0x408ce9
mov eax, dword [ebp + 0xc]
jmp 0x408d70
mov edi, dword [ebp + 0xc]
mov al, byte [edi]
mov ebx, edi
mov ecx, edi
jmp 0x408d02
cmp al, 0x2f
je 0x408cfc
cmp al, 0x5c
jne 0x408cff
lea ebx, [ecx + 1]
inc ecx
mov al, byte [ecx]
test al, al
jne 0x408cf4
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.0042dbd0
cmp ebx, edi
pop ecx
pop ecx
jne 0x408d85
mov byte [ebp - 0x108], 0
push ebx
lea eax, [ebp - 0x108]
push eax
lea edi, [esi + 0x140]
push edi
lea eax, [ebp - 0x338]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push edi
call fcn.00405c1a
add esp, 0x1c
xor eax, eax
push eax
push dword [ebp - 0x12c]
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp - 0x338]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x33c], eax
jne 0x408ded
mov eax, 0x200
jmp 0x408ebd
mov eax, ebx
sub eax, edi
mov byte [ebp + eax - 0x108], 0
cmp byte [ebp - 0x108], 0x2f
je 0x408dbd
cmp byte [ebp - 0x108], 0x5c
je 0x408dbd
cmp byte [ebp - 0x108], 0
je 0x408d20
cmp byte [ebp - 0x107], 0x3a
jne 0x408d20
push ebx
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x338]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push 0
call fcn.00405c1a
add esp, 0x18
jmp 0x408d51
push dword [esi + 0x138]
push dword [esi]
call fcn.00408735
cmp dword [esi + 0x13c], 0
pop ecx
pop ecx
mov ebx, 0x4000
jne 0x408e17
push ebx
call fcn.0041c7ff
pop ecx
mov dword [esi + 0x13c], eax
and dword [ebp + 8], 0
lea eax, [ebp + 0xf]
push eax
push ebx
push dword [esi + 0x13c]
push dword [esi]
call fcn.00408895
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x408e6d
test edi, edi
jl 0x408e64
jle 0x408e5a
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [esi + 0x13c]
push dword [ebp - 0x33c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408e76
cmp byte [ebp + 0xf], 0
jne 0x408e7f
test edi, edi
jne 0x408e1b
mov dword [ebp + 8], 0x5000000
jmp 0x408ea0
mov dword [ebp + 8], 0x1000
jmp 0x408ea0
mov dword [ebp + 8], 0x400
jmp 0x408ea0
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x33c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x408eb2
push dword [ebp - 0x33c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.00405632
mov eax, dword [ebp + 8]
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0042d7f1
leave
ret 0x10