Function at 0x403470
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41a5a0
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 0x4034de
cmp dword [ebp + 8], 0xffffffff
je 0x4034be
mov eax, dword [ebp + 8]
mov dword [ebp - 0xcc], eax
jmp 0x4034ce
or ecx, 0xffffffff
neg ecx
sbb ecx, ecx
add ecx, 1
mov dword [ebp - 0xcc], ecx
mov eax, dword [ebp - 0xcc]
jmp 0x4038e3
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 0x40357d
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 0x40357d
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 0x4038e3
mov eax, dword [ebp - 0xc8]
cmp dword [eax + 0x54], 0
jne 0x403591
or eax, 0xffffffff
jmp 0x4038e3
mov ecx, dword [ebp - 0xc8]
call fcn.00405030
mov ecx, dword [ebp - 0xc8]
cmp dword [ecx + 0x44], 0
jne 0x4035ff
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.00407ce1
add esp, 8
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
movzx edx, cl
test edx, edx
je 0x4035e5
mov eax, dword [ebp + 8]
mov dword [ebp - 0xd4], eax
jmp 0x4035ef
mov dword [ebp - 0xd4], 0xffffffff
mov eax, dword [ebp - 0xd4]
jmp 0x4038e3
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.00404830
push 0
push 8
lea ecx, [ebp - 0x38]
call fcn.00405440
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00405620
mov dword [ebp - 0x8c], eax
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x8c]
push edx
lea ecx, [ebp - 0x44]
call fcn.00406170
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x94], ecx
lea ecx, [ebp - 0x38]
call fcn.00405620
mov dword [ebp - 0x98], eax
lea edx, [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x98]
push eax
lea ecx, [ebp - 0x48]
call fcn.00406170
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x9c], ecx
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0x44]
mov dword [ebp - 0xa0], eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x90]
add edx, dword [ebp - 0x94]
push edx
mov eax, dword [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x15]
push eax
mov ecx, dword [ebp - 0xc8]
add ecx, 0x4c
push ecx
mov edx, dword [ebp - 0xa0]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xa0]
mov edx, dword [eax + 0x14]
call edx
mov dword [ebp - 0xdc], eax
cmp dword [ebp - 0xdc], 0
jl 0x4038ac
cmp dword [ebp - 0xdc], 1
jle 0x403722
cmp dword [ebp - 0xdc], 3
je 0x403838
jmp 0x4038ac
lea ecx, [ebp - 0x38]
call fcn.00405620
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0xa4]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.00406170
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x4c]
mov dword [ebp - 0x3c], edx
je 0x4037b4
lea ecx, [ebp - 0x38]
call fcn.00405620
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x50], eax
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.0040a59f
add esp, 0x10
cmp dword [ebp - 0x3c], eax
je 0x4037b4
mov dword [ebp - 0x54], 0xffffffff
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.00404830
mov eax, dword [ebp - 0x54]
jmp 0x4038e3
mov eax, dword [ebp - 0xc8]
mov byte [eax + 0x49], 1
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x15]
cmp ecx, edx
je 0x4037e9
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], eax
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.00404830
mov eax, dword [ebp - 0x58]
jmp 0x4038e3
cmp dword [ebp - 0x3c], 0
jbe 0x4037f1
jmp 0x403833
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0xb0], ecx
cmp dword [ebp - 0xb0], 0x20
jae 0x403811
push 0
push 8
lea ecx, [ebp - 0x38]
call fcn.00404540
jmp 0x403833
mov dword [ebp - 0x5c], 0xffffffff
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.00404830
mov eax, dword [ebp - 0x5c]
jmp 0x4038e3
jmp 0x4038cb
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.00407ce1
add esp, 8
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
movzx edx, cl
test edx, edx
je 0x403881
mov eax, dword [ebp + 8]
mov dword [ebp - 0xe0], eax
jmp 0x40388b
mov dword [ebp - 0xe0], 0xffffffff
mov ecx, dword [ebp - 0xe0]
mov dword [ebp - 0x60], ecx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.00404830
mov eax, dword [ebp - 0x60]
jmp 0x4038e3
mov dword [ebp - 0x64], 0xffffffff
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.00404830
mov eax, dword [ebp - 0x64]
jmp 0x4038e3
jmp 0x403647
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4