Function at 0x406f9e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4da954
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x524330]
xor eax, ebp
mov dword [ebp - 0x18], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10c], ecx
mov eax, dword [ebp - 0x10c]
cmp dword [eax + 0x3c], 0
je 0x406fe9
mov eax, dword [ebp - 0x10c]
movzx eax, byte [eax + 0x41]
test eax, eax
jne 0x406ff5
mov al, 1
jmp 0x407216
mov dword [ebp - 0x10], 8
push 0xffffffffffffffff
mov eax, dword [ebp - 0x10c]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10c]
call dword [eax + 4]
mov dword [ebp - 0x3c], eax
or dword [ebp - 0x40], 0xffffffff
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x3c]
neg eax
sbb eax, eax
inc eax
movzx eax, al
test eax, eax
je 0x40702f
xor al, al
jmp 0x407216
lea eax, [ebp - 0x6d]
mov dword [ebp - 0x6c], eax
push 0
push 0
lea ecx, [ebp - 0x34]
call fcn.00406cea
push 0
push 8
lea ecx, [ebp - 0x34]
call fcn.00407512
and dword [ebp - 4], 0
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x34]
call fcn.00406cb0
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 0x78]
call fcn.00407a56
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x34]
call fcn.00406cb0
mov dword [ebp - 0x88], eax
mov ecx, dword [ebp - 0x88]
call fcn.00407a56
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x10c]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x7c]
add eax, dword [ebp - 0x80]
push eax
push dword [ebp - 0x8c]
mov eax, dword [ebp - 0x10c]
add eax, 0x44
push eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x90]
call dword [eax + 0x18]
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0
je 0x4070f9
cmp dword [ebp - 0x110], 1
je 0x407103
cmp dword [ebp - 0x110], 3
je 0x4071cf
jmp 0x4071e8
mov eax, dword [ebp - 0x10c]
mov byte [eax + 0x41], 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x34]
call fcn.00406cb0
mov dword [ebp - 0x98], eax
mov ecx, dword [ebp - 0x98]
call fcn.00407a56
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x9c]
mov dword [ebp - 0x38], eax
je 0x407194
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x34]
call fcn.00406cb0
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa4]
call fcn.00407a56
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0x10c]
push dword [eax + 0x4c]
push dword [ebp - 0x38]
push 1
push dword [ebp - 0xa8]
call fcn.004bd0d2
add esp, 0x10
cmp dword [ebp - 0x38], eax
je 0x407194
mov byte [ebp - 0x61], 0
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x34]
call fcn.00406cea
mov al, byte [ebp - 0x61]
jmp 0x407216
mov eax, dword [ebp - 0x10c]
movzx eax, byte [eax + 0x41]
test eax, eax
jne 0x4071bb
mov byte [ebp - 0x62], 1
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x34]
call fcn.00406cea
mov al, byte [ebp - 0x62]
jmp 0x407216
cmp dword [ebp - 0x38], 0
jne 0x4071cd
push 0
push 8
lea ecx, [ebp - 0x34]
call fcn.004069f4
jmp 0x407201
mov byte [ebp - 0x63], 1
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x34]
call fcn.00406cea
mov al, byte [ebp - 0x63]
jmp 0x407216
mov byte [ebp - 0x64], 0
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x34]
call fcn.00406cea
mov al, byte [ebp - 0x64]
jmp 0x407216
jmp 0x407051
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.004bc439
leave
ret