Function at 0x406f40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x545a58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa0
mov dword [ebp - 0xa4], ecx
mov eax, dword [ebp - 0xa4]
cmp dword [eax + 0x44], 0
je 0x406f7e
mov ecx, dword [ebp - 0xa4]
movzx edx, byte [ecx + 0x49]
test edx, edx
jne 0x406f8a
mov al, 1
jmp 0x407205
mov dword [ebp - 0x10], 8
push 0xffffffffffffffff
mov eax, dword [ebp - 0xa4]
mov edx, dword [eax]
mov ecx, dword [ebp - 0xa4]
mov eax, dword [edx + 0xc]
call eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], 0xffffffff
mov ecx, dword [ebp - 0x3c]
xor edx, edx
cmp ecx, dword [ebp - 0x38]
sete dl
movzx eax, dl
test eax, eax
je 0x406fc9
xor al, al
jmp 0x407205
lea ecx, [ebp - 0x59]
mov dword [ebp - 0x58], ecx
lea edx, [ebp - 0x30]
mov dword [ebp - 0xa8], edx
mov dword [ebp - 4], 0
push 0
push 0
lea ecx, [ebp - 0x30]
call fcn.004064f0
push 0
push 8
lea ecx, [ebp - 0x30]
call fcn.004077e0
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00406590
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x40], eax
xor ecx, ecx
jne 0x40700f
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x64], edx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x1c], 0x10
jb 0x40702d
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x6c], ecx
jmp 0x407033
lea edx, [ebp - 0x30]
mov dword [ebp - 0x6c], edx
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x6c]
push ecx
lea ecx, [ebp - 0x44]
call fcn.004084a0
xor edx, edx
jne 0x407043
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ecx + 0x44]
mov dword [ebp - 0x74], edx
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x64]
add ecx, dword [ebp - 0x68]
push ecx
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp - 0xa4]
add eax, 0x4c
push eax
mov ecx, dword [ebp - 0x74]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x74]
mov eax, dword [edx + 0x18]
call eax
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0xac], 0
je 0x4070a9
cmp dword [ebp - 0xac], 1
je 0x4070b3
cmp dword [ebp - 0xac], 3
je 0x4071a0
jmp 0x4071c3
mov ecx, dword [ebp - 0xa4]
mov byte [ecx + 0x49], 0
cmp dword [ebp - 0x1c], 0x10
jb 0x4070c1
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x78], edx
jmp 0x4070c7
lea eax, [ebp - 0x30]
mov dword [ebp - 0x78], eax
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x78]
push edx
lea ecx, [ebp - 0x48]
call fcn.004084a0
xor eax, eax
jne 0x4070d7
mov ecx, dword [ebp - 0x14]
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x34], ecx
je 0x40715b
cmp dword [ebp - 0x1c], 0x10
jb 0x4070f4
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x7c], edx
jmp 0x4070fa
lea eax, [ebp - 0x30]
mov dword [ebp - 0x7c], eax
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x7c]
push edx
lea ecx, [ebp - 0x4c]
call fcn.004084a0
xor eax, eax
jne 0x40710a
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x80], ecx
mov edx, dword [ebp - 0xa4]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
push 1
mov edx, dword [ebp - 0x80]
push edx
call fcn.00529dad
add esp, 0x10
cmp dword [ebp - 0x34], eax
je 0x40715b
mov byte [ebp - 0x4d], 0
mov dword [ebp - 4], 2
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.004064f0
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x4d]
jmp 0x407205
mov eax, dword [ebp - 0xa4]
movzx ecx, byte [eax + 0x49]
test ecx, ecx
jne 0x40718c
mov byte [ebp - 0x4e], 1
mov dword [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.004064f0
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x4e]
jmp 0x407205
cmp dword [ebp - 0x34], 0
jne 0x40719e
push 0
push 8
lea ecx, [ebp - 0x30]
call fcn.00406300
jmp 0x4071e6
mov byte [ebp - 0x4f], 1
mov dword [ebp - 4], 4
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.004064f0
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x4f]
jmp 0x407205
mov byte [ebp - 0x50], 0
mov dword [ebp - 4], 5
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.004064f0
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x50]
jmp 0x407205
jmp 0x406ffe
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret