Function at 0x516d40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x6c6060]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x9c], ecx
mov eax, dword [ebp - 0x9c]
cmp dword [eax + 0x44], 0
je 0x516d73
mov ecx, dword [ebp - 0x9c]
movzx edx, byte [ecx + 0x49]
test edx, edx
jne 0x516d7f
mov al, 1
jmp 0x516f9a
mov dword [ebp - 4], 8
push 0xffffffffffffffff
mov eax, dword [ebp - 0x9c]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x9c]
mov eax, dword [edx + 0xc]
call eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], 0xffffffff
mov ecx, dword [ebp - 0x34]
xor edx, edx
cmp ecx, dword [ebp - 0x30]
sete dl
movzx eax, dl
test eax, eax
je 0x516dbe
xor al, al
jmp 0x516f9a
lea ecx, [ebp - 0x51]
mov dword [ebp - 0x50], ecx
push 0
push 0
lea ecx, [ebp - 0x28]
call fcn.0042fcb0
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.00516fb0
lea ecx, [ebp - 0x28]
call fcn.0042faf0
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x38], edx
xor eax, eax
jne 0x516ded
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x60], edx
cmp dword [ebp - 0x14], 0x10
jb 0x516e0b
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x64], eax
jmp 0x516e11
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x64], ecx
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x64]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00530830
xor ecx, ecx
jne 0x516e21
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x9c]
mov ecx, dword [eax + 0x44]
mov dword [ebp - 0x6c], ecx
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0x5c]
add eax, dword [ebp - 0x60]
push eax
mov ecx, dword [ebp - 0x68]
push ecx
mov edx, dword [ebp - 0x9c]
add edx, 0x4c
push edx
mov eax, dword [ebp - 0x6c]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x6c]
mov eax, dword [edx + 0x18]
call eax
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0
je 0x516e87
cmp dword [ebp - 0xa0], 1
je 0x516e91
cmp dword [ebp - 0xa0], 3
je 0x516f5f
jmp 0x516f74
mov ecx, dword [ebp - 0x9c]
mov byte [ecx + 0x49], 0
cmp dword [ebp - 0x14], 0x10
jb 0x516e9f
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x70], edx
jmp 0x516ea5
lea eax, [ebp - 0x28]
mov dword [ebp - 0x70], eax
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x70]
push edx
lea ecx, [ebp - 0x40]
call fcn.00530830
xor eax, eax
jne 0x516eb5
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x40]
mov dword [ebp - 0x2c], ecx
je 0x516f28
cmp dword [ebp - 0x14], 0x10
jb 0x516ed2
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x74], edx
jmp 0x516ed8
lea eax, [ebp - 0x28]
mov dword [ebp - 0x74], eax
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x74]
push edx
lea ecx, [ebp - 0x44]
call fcn.00530830
xor eax, eax
jne 0x516ee8
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp - 0x9c]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
push 1
mov edx, dword [ebp - 0x78]
push edx
call fcn.0058a82a
add esp, 0x10
cmp dword [ebp - 0x2c], eax
je 0x516f28
mov byte [ebp - 0x45], 0
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0042fcb0
mov al, byte [ebp - 0x45]
jmp 0x516f9a
mov eax, dword [ebp - 0x9c]
movzx ecx, byte [eax + 0x49]
test ecx, ecx
jne 0x516f4b
mov byte [ebp - 0x46], 1
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0042fcb0
mov al, byte [ebp - 0x46]
jmp 0x516f9a
cmp dword [ebp - 0x2c], 0
jne 0x516f5d
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.005167b0
jmp 0x516f89
mov byte [ebp - 0x47], 1
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0042fcb0
mov al, byte [ebp - 0x47]
jmp 0x516f9a
mov byte [ebp - 0x48], 0
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0042fcb0
mov al, byte [ebp - 0x48]
jmp 0x516f9a
jmp 0x516ddc
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0058a4a9
mov esp, ebp
pop ebp
ret