Function at 0x408720
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x5b37b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x33c], ecx
test eax, eax
jne 0x40875b
mov eax, 0x10000
mov dword [0x5b4f88], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff460
mov esp, ebp
pop ebp
ret
cmp dword [eax], 1
je 0x408778
mov eax, 0x80000
mov dword [0x5b4f88], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff460
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
mov edi, dword [eax + 4]
or esi, 0xffffffff
cmp dword [edi + 4], esi
je 0x408791
mov edx, dword [edi]
push edx
call fcn.00406240
add esp, 4
mov eax, dword [edi]
mov ebx, dword [ebp + 0xc]
mov dword [edi + 4], esi
cmp ebx, dword [eax + 4]
jl 0x4087a8
mov eax, 0x10000
jmp 0x408a5c
cmp ebx, dword [eax + 0x10]
jge 0x4087b6
push eax
call fcn.00405fa0
add esp, 4
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jge 0x408814
lea ecx, [ecx]
mov esi, dword [edi]
test esi, esi
je 0x40880d
cmp dword [esi + 0x18], 0
je 0x40880d
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x40880d
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
push 0
push 0
push 0
push 0
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
push 0
lea edx, [esi + 0x78]
mov dword [esi + 0x10], eax
push edx
lea eax, [esi + 0x28]
push eax
push esi
call fcn.00405c00
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [edi]
cmp dword [ecx + 0x10], ebx
jl 0x4087c0
lea edx, [ebp - 0x338]
push edx
push ebx
mov ecx, edi
call fcn.004063e0
test byte [ebp - 0x230], 0x10
je 0x40886f
mov ecx, dword [ebp - 0x33c]
mov al, byte [ecx]
cmp al, 0x2f
je 0x408846
cmp al, 0x5c
je 0x408846
test al, al
je 0x408858
cmp byte [ecx + 1], 0x3a
jne 0x408858
push ecx
push 0
call fcn.004069d0
add esp, 8
xor eax, eax
jmp 0x408a5c
push ecx
add edi, 0x140
push edi
call fcn.004069d0
add esp, 8
xor eax, eax
jmp 0x408a5c
mov ebx, dword [ebp - 0x33c]
mov esi, ebx
mov al, byte [esi]
mov ecx, esi
test al, al
je 0x408893
nop
cmp al, 0x2f
je 0x408888
cmp al, 0x5c
jne 0x40888b
lea ebx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x408880
lea edx, [ebp - 0x108]
mov eax, esi
sub edx, esi
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4088a0
cmp ebx, esi
jne 0x408917
mov byte [ebp - 0x108], cl
push ebx
lea ecx, [ebp - 0x108]
push ecx
lea esi, [edi + 0x140]
push esi
lea edx, [ebp - 0x20c]
push 0x564408
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push esi
call fcn.004069d0
add esp, 0x1c
mov ecx, dword [ebp - 0x230]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x408976
mov eax, 0x200
jmp 0x408a5c
mov eax, ebx
sub eax, esi
mov byte [ebp + eax - 0x108], 0
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x408946
cmp al, 0x5c
je 0x408946
test al, al
je 0x4088b4
cmp byte [ebp - 0x107], 0x3a
jne 0x4088b4
push ebx
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x20c]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push 0
call fcn.004069d0
add esp, 0x18
jmp 0x4088e5
mov eax, dword [edi + 0x138]
mov ecx, dword [edi]
push eax
push ecx
call fcn.00408180
add esp, 8
cmp dword [edi + 0x13c], 0
jne 0x4089a4
push 0x4000
call fcn.00408bac
add esp, 4
mov dword [edi + 0x13c], eax
mov dword [ebp - 0x33c], 0
mov edi, edi
mov eax, dword [edi + 0x13c]
mov ecx, dword [edi]
lea edx, [ebp - 0x33d]
push edx
push 0x4000
push eax
push ecx
call fcn.00408300
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x408a10
test esi, esi
js 0x408a04
jle 0x4089f7
mov eax, dword [edi + 0x13c]
push 0
lea edx, [ebp - 0x344]
push edx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408a1c
cmp byte [ebp - 0x33d], 0
jne 0x408a28
test esi, esi
jne 0x4089b0
mov dword [ebp - 0x33c], 0x5000000
jmp 0x408a44
mov dword [ebp - 0x33c], 0x1000
jmp 0x408a44
mov dword [ebp - 0x33c], 0x400
jmp 0x408a44
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
push ecx
call fcn.00406240
mov eax, dword [ebp - 0x33c]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
mov dword [0x5b4f88], eax
call fcn.004ff460
mov esp, ebp
pop ebp
ret