Function at 0x405f80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43715f
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x4474dc]
xor eax, ebp
mov dword [ebp - 0x18], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x84], 0
mov eax, dword [ebp - 0x88]
cmp dword [eax + 0x44], 0
je 0x405fd6
mov ecx, dword [ebp - 0x88]
movzx edx, byte [ecx + 0x49]
test edx, edx
jne 0x405fe2
mov al, 1
jmp 0x406293
mov dword [ebp - 0x10], 8
call fcn.004015a0
push eax
mov eax, dword [ebp - 0x88]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x88]
mov eax, dword [edx + 0xc]
call eax
mov dword [ebp - 0x40], eax
call fcn.004015a0
mov dword [ebp - 0x44], eax
lea ecx, [ebp - 0x40]
push ecx
lea edx, [ebp - 0x44]
push edx
call fcn.00401550
add esp, 8
movzx eax, al
test eax, eax
je 0x40602b
xor al, al
jmp 0x406293
push 0
push 8
lea ecx, [ebp - 0x38]
call fcn.00405410
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x38]
call fcn.004056c0
mov dword [ebp - 0x8c], eax
mov edx, dword [ebp - 0x8c]
mov dword [ebp - 0x90], edx
mov byte [ebp - 4], 1
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x38]
call fcn.004056c0
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x98], ecx
mov byte [ebp - 4], 2
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x38]
call fcn.00405700
mov esi, eax
mov ecx, dword [ebp - 0x90]
call fcn.00406390
add eax, esi
push eax
mov ecx, dword [ebp - 0x98]
call fcn.00406390
push eax
mov eax, dword [ebp - 0x88]
add eax, 0x4c
push eax
mov ecx, dword [ebp - 0x88]
mov ecx, dword [ecx + 0x44]
call fcn.00408720
mov dword [ebp - 0x48], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
call fcn.00405270
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.00405270
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x9c], edx
cmp dword [ebp - 0x9c], 0
je 0x40610a
cmp dword [ebp - 0x9c], 1
je 0x406114
cmp dword [ebp - 0x9c], 3
je 0x40624f
jmp 0x406267
mov eax, dword [ebp - 0x88]
mov byte [eax + 0x49], 0
lea ecx, [ebp - 0x6c]
push ecx
lea ecx, [ebp - 0x38]
call fcn.004056c0
mov dword [ebp - 0xa0], eax
mov edx, dword [ebp - 0xa0]
mov dword [ebp - 0xa4], edx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0xa4]
call fcn.00406390
mov ecx, dword [ebp - 0x14]
sub ecx, eax
mov dword [ebp - 0x3c], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x6c]
call fcn.00405270
cmp dword [ebp - 0x3c], 0
jbe 0x4061c1
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0x38]
call fcn.004056c0
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0xac], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x84]
or ecx, 1
mov dword [ebp - 0x84], ecx
mov edx, dword [ebp - 0x88]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
push 1
mov ecx, dword [ebp - 0xac]
call fcn.00406390
push eax
call fcn.004108d0
add esp, 0x10
cmp dword [ebp - 0x3c], eax
je 0x4061c1
mov dword [ebp - 0xb0], 1
jmp 0x4061cb
mov dword [ebp - 0xb0], 0
mov dl, byte [ebp - 0xb0]
mov byte [ebp - 0x6d], dl
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x84]
and eax, 1
je 0x4061f5
and dword [ebp - 0x84], 0xfffffffe
lea ecx, [ebp - 0x7c]
call fcn.00405270
movzx ecx, byte [ebp - 0x6d]
test ecx, ecx
je 0x406215
mov byte [ebp - 0x7d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.004039b0
mov al, byte [ebp - 0x7d]
jmp 0x406293
mov edx, dword [ebp - 0x88]
movzx eax, byte [edx + 0x49]
test eax, eax
jne 0x40623b
mov byte [ebp - 0x7e], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.004039b0
mov al, byte [ebp - 0x7e]
jmp 0x406293
cmp dword [ebp - 0x3c], 0
jne 0x40624d
push 0
push 8
lea ecx, [ebp - 0x38]
call fcn.00405570
jmp 0x40627f
mov byte [ebp - 0x7f], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.004039b0
mov al, byte [ebp - 0x7f]
jmp 0x406293
mov byte [ebp - 0x80], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.004039b0
mov al, byte [ebp - 0x80]
jmp 0x406293
jmp 0x40603e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0040c0b0
mov esp, ebp
pop ebp
ret