Function at 0x405700
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x548630
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xd4
mov dword [ebp - 0xc8], ecx
mov dword [ebp - 0x40], 0xffffffff
mov eax, dword [ebp - 0x40]
xor ecx, ecx
cmp eax, dword [ebp + 8]
sete cl
movzx edx, cl
test edx, edx
je 0x40576e
cmp dword [ebp + 8], 0xffffffff
je 0x40574e
mov eax, dword [ebp + 8]
mov dword [ebp - 0xcc], eax
jmp 0x40575e
or ecx, 0xffffffff
neg ecx
sbb ecx, ecx
add ecx, 1
mov dword [ebp - 0xcc], ecx
mov eax, dword [ebp - 0xcc]
jmp 0x405bad
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
mov dword [ebp - 0x68], ecx
cmp dword [ebp - 0x68], 0
je 0x40580d
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x34]
mov ecx, dword [ebp - 0xc8]
mov edx, dword [ecx + 0x24]
mov ecx, dword [edx]
add ecx, dword [eax]
cmp dword [ebp - 0x6c], ecx
jae 0x40580d
mov dl, byte [ebp + 8]
mov byte [ebp - 0x6d], dl
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax + 0x34]
mov edx, dword [ecx]
sub edx, 1
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax + 0x34]
mov dword [ecx], edx
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
mov dword [ebp - 0xd0], ecx
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x24]
mov dword [eax], ecx
mov ecx, dword [ebp - 0xd0]
mov dl, byte [ebp - 0x6d]
mov byte [ecx], dl
mov eax, dword [ebp + 8]
jmp 0x405bad
mov eax, dword [ebp - 0xc8]
cmp dword [eax + 0x54], 0
jne 0x405821
or eax, 0xffffffff
jmp 0x405bad
mov ecx, dword [ebp - 0xc8]
call fcn.00408010
mov ecx, dword [ebp - 0xc8]
cmp dword [ecx + 0x44], 0
jne 0x40588f
mov dl, byte [ebp + 8]
mov byte [ebp - 0x75], dl
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax + 0x54]
mov dword [ebp - 0x7c], ecx
mov edx, dword [ebp - 0x7c]
push edx
movsx eax, byte [ebp - 0x75]
push eax
call fcn.0052be47
add esp, 8
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
movzx edx, cl
test edx, edx
je 0x405875
mov eax, dword [ebp + 8]
mov dword [ebp - 0xd4], eax
jmp 0x40587f
mov dword [ebp - 0xd4], 0xffffffff
mov eax, dword [ebp - 0xd4]
jmp 0x405bad
mov dword [ebp - 0x10], 8
mov cl, byte [ebp + 8]
mov byte [ebp - 0x15], cl
lea edx, [ebp - 0x85]
mov dword [ebp - 0x84], edx
lea eax, [ebp - 0x38]
mov dword [ebp - 0xd8], eax
mov dword [ebp - 4], 0
push 0
push 0
lea ecx, [ebp - 0x38]
call fcn.004072f0
push 0
push 8
lea ecx, [ebp - 0x38]
call fcn.004085d0
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00407390
mov dword [ebp - 0x8c], eax
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x8c]
push edx
lea ecx, [ebp - 0x44]
call fcn.00409480
xor eax, eax
jne 0x4058f8
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x90], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x94], edx
lea ecx, [ebp - 0x38]
call fcn.00407390
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
lea ecx, [ebp - 0x48]
call fcn.00409480
xor edx, edx
jne 0x40592f
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0xc8]
mov edx, dword [ecx + 0x44]
mov dword [ebp - 0xa0], edx
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x90]
add ecx, dword [ebp - 0x94]
push ecx
mov edx, dword [ebp - 0x9c]
push edx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x15]
push edx
mov eax, dword [ebp - 0xc8]
add eax, 0x4c
push eax
mov ecx, dword [ebp - 0xa0]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0xa0]
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 0xdc], eax
cmp dword [ebp - 0xdc], 0
jl 0x405b68
cmp dword [ebp - 0xdc], 1
jle 0x4059ba
cmp dword [ebp - 0xdc], 3
je 0x405aed
jmp 0x405b68
lea ecx, [ebp - 0x38]
call fcn.00407390
mov dword [ebp - 0xa4], eax
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0xa4]
push edx
lea ecx, [ebp - 0x4c]
call fcn.00409480
xor eax, eax
jne 0x4059db
mov ecx, dword [ebp - 0x1c]
sub ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x3c], ecx
je 0x405a5b
lea ecx, [ebp - 0x38]
call fcn.00407390
mov dword [ebp - 0xa8], eax
mov edx, dword [ebp - 0xa8]
mov dword [ebp - 0x50], edx
xor eax, eax
jne 0x405a01
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0xac], ecx
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
push 1
mov edx, dword [ebp - 0xac]
push edx
call fcn.0052bdcd
add esp, 0x10
cmp dword [ebp - 0x3c], eax
je 0x405a5b
mov dword [ebp - 0x54], 0xffffffff
mov dword [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.004072f0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x54]
jmp 0x405bad
mov eax, dword [ebp - 0xc8]
mov byte [eax + 0x49], 1
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x15]
cmp ecx, edx
je 0x405a97
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], eax
mov dword [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.004072f0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x58]
jmp 0x405bad
cmp dword [ebp - 0x3c], 0
jbe 0x405a9f
jmp 0x405ae8
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0xb0], ecx
cmp dword [ebp - 0xb0], 0x20
jae 0x405abf
push 0
push 8
lea ecx, [ebp - 0x38]
call fcn.00407100
jmp 0x405ae8
mov dword [ebp - 0x5c], 0xffffffff
mov dword [ebp - 4], 4
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.004072f0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x5c]
jmp 0x405bad
jmp 0x405b8e
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x54]
mov dword [ebp - 0xbc], eax
mov cl, byte [ebp - 0x15]
mov byte [ebp - 0xb5], cl
mov edx, dword [ebp - 0xbc]
push edx
movsx eax, byte [ebp - 0xb5]
push eax
call fcn.0052be47
add esp, 8
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
movzx edx, cl
test edx, edx
je 0x405b36
mov eax, dword [ebp + 8]
mov dword [ebp - 0xe0], eax
jmp 0x405b40
mov dword [ebp - 0xe0], 0xffffffff
mov ecx, dword [ebp - 0xe0]
mov dword [ebp - 0x60], ecx
mov dword [ebp - 4], 5
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.004072f0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x60]
jmp 0x405bad
mov dword [ebp - 0x64], 0xffffffff
mov dword [ebp - 4], 6
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.004072f0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x64]
jmp 0x405bad
jmp 0x4058d7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4