Function at 0x408a6f
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x2e4]
sub esp, 0x364
mov eax, dword [0x474e90]
xor eax, ebp
mov dword [ebp + 0x2e0], eax
cmp dword [ebp + 0x2f8], 3
push ebx
mov ebx, dword [ebp + 0x2f0]
push esi
push edi
mov esi, ecx
je 0x408ac2
cmp dword [ebp + 0x2f8], 2
je 0x408b6e
cmp dword [ebp + 0x2f8], 1
je 0x408b6e
mov eax, 0x10000
jmp 0x408e24
mov eax, dword [esi + 4]
mov edi, dword [ebp + 0x2ec]
cmp edi, eax
je 0x408b14
cmp eax, 0xffffffff
je 0x408adc
push dword [esi]
call fcn.0040632e
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x408ab8
cmp edi, dword [eax + 0x10]
jge 0x408afc
push eax
call fcn.0040603b
jmp 0x408afb
push dword [esi]
call fcn.00406079
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x408af4
push dword [esi + 0x138]
push eax
call fcn.00406f3d
pop ecx
pop ecx
mov dword [esi + 4], edi
lea eax, [ebp - 0x55]
push eax
push dword [ebp + 0x2f4]
push ebx
push dword [esi]
call fcn.00408848
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x408b3b
push dword [esi]
call fcn.0040632e
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x55], 0
je 0x408b48
xor eax, eax
jmp 0x408e24
test edi, edi
jle 0x408b56
mov eax, 0x600
jmp 0x408e24
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x408e24
cmp dword [esi + 4], 0xffffffff
je 0x408b7c
push dword [esi]
call fcn.0040632e
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 0x2ec]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x408ab8
cmp edi, dword [eax + 0x10]
jge 0x408ba6
push eax
call fcn.0040603b
jmp 0x408ba5
push dword [esi]
call fcn.00406079
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x408b9e
lea eax, [ebp - 0x54]
push eax
push edi
mov ecx, esi
call fcn.0040709b
mov eax, dword [ebp + 0xb4]
shr eax, 4
test al, 1
je 0x408c00
cmp dword [ebp + 0x2f8], 1
je 0x408b41
mov al, byte [ebx]
cmp al, 0x2f
je 0x408be7
cmp al, 0x5c
je 0x408be7
test al, al
je 0x408bec
cmp byte [ebx + 1], 0x3a
jne 0x408bec
push ebx
push 0
jmp 0x408bf4
push ebx
add esi, 0x140
push esi
call fcn.00406411
pop ecx
pop ecx
jmp 0x408b41
cmp dword [ebp + 0x2f8], 1
mov byte [ebp + 0xd8], 0
jne 0x408c1a
mov dword [ebp - 0x60], ebx
xor ebx, ebx
jmp 0x408d55
mov al, byte [ebx]
mov dword [ebp - 0x5c], ebx
mov ecx, ebx
jmp 0x408c34
cmp al, 0x2f
je 0x408c2b
cmp al, 0x5c
jne 0x408c31
lea eax, [ecx + 1]
mov dword [ebp - 0x5c], eax
inc ecx
mov al, byte [ecx]
test al, al
jne 0x408c23
push 0x104
lea eax, [ebp + 0x1dc]
push ebx
push eax
call fcn.0043f4a9
add esp, 0xc
cmp dword [ebp - 0x5c], ebx
jne 0x408c75
mov byte [ebp + 0x1dc], 0
lea eax, [ebp - 0x80]
push eax
call fcn.0041cc52
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x408cf4
mov eax, dword [eax + 4]
jmp 0x408cf7
mov eax, dword [ebp - 0x5c]
sub eax, ebx
mov byte [ebp + eax + 0x1dc], 0
cmp byte [ebp + 0x1dc], 0x2f
je 0x408ca6
cmp byte [ebp + 0x1dc], 0x5c
je 0x408ca6
cmp byte [ebp + 0x1dc], 0
je 0x408c59
cmp byte [ebp + 0x1dd], 0x3a
jne 0x408c59
lea eax, [ebp - 0x80]
push eax
call fcn.0041cb18
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x408cbb
mov eax, dword [eax + 4]
jmp 0x408cbe
add eax, 4
push dword [ebp - 0x5c]
lea ecx, [ebp + 0x1dc]
push ecx
push eax
lea eax, [ebp + 0xd8]
push eax
call fcn.0043fb58
add esp, 0x10
xor ebx, ebx
push ebx
push 1
lea ecx, [ebp - 0x80]
call fcn.00401ce8
lea eax, [ebp + 0x1dc]
push eax
push ebx
call fcn.00406411
jmp 0x408d33
add eax, 4
push dword [ebp - 0x5c]
lea ecx, [ebp + 0x1dc]
push ecx
lea edi, [esi + 0x140]
push edi
push eax
lea eax, [ebp + 0xd8]
push eax
call fcn.0043fb58
add esp, 0x14
push 0
push 1
lea ecx, [ebp - 0x80]
call fcn.00401ce8
lea eax, [ebp + 0x1dc]
push eax
push edi
call fcn.00406411
xor ebx, ebx
pop ecx
pop ecx
push ebx
push dword [ebp + 0xb4]
lea eax, [ebp + 0xd8]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0xffffffff
jne 0x408d65
mov eax, 0x200
jmp 0x408e24
push dword [esi + 0x138]
push dword [esi]
call fcn.00406f3d
cmp dword [esi + 0x13c], ebx
pop ecx
pop ecx
jne 0x408d8d
push 0x4000
call fcn.0042f6b2
pop ecx
mov dword [esi + 0x13c], eax
mov dword [ebp - 0x5c], ebx
lea eax, [ebp - 0x55]
push eax
push 0x4000
push dword [esi + 0x13c]
push dword [esi]
call fcn.00408848
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x408e3e
cmp edi, ebx
jl 0x408ddd
jle 0x408dd3
push ebx
lea eax, [ebp - 0x64]
push eax
push edi
push dword [esi + 0x13c]
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408e47
cmp byte [ebp - 0x55], 0
jne 0x408de4
cmp edi, ebx
jne 0x408d90
mov dword [ebp - 0x5c], 0x5000000
push dword [esi]
call fcn.0040632e
cmp dword [ebp - 0x5c], ebx
pop ecx
jne 0x408e0f
lea eax, [ebp + 0xc8]
push eax
lea eax, [ebp + 0xb8]
push eax
lea eax, [ebp + 0xc0]
push eax
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x2f8], 1
je 0x408e21
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp + 0x2e0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043e613
add ebp, 0x2e4
leave
ret 0x10
mov dword [ebp - 0x5c], 0x1000
jmp 0x408de4
mov dword [ebp - 0x5c], 0x400
jmp 0x408de4