Function at 0x516e60
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 0x516e93
mov ecx, dword [ebp - 0x9c]
movzx edx, byte [ecx + 0x49]
test edx, edx
jne 0x516e9f
mov al, 1
jmp 0x5170ba
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 0x516ede
xor al, al
jmp 0x5170ba
lea ecx, [ebp - 0x51]
mov dword [ebp - 0x50], ecx
push 0
push 0
lea ecx, [ebp - 0x28]
call fcn.0042fca0
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.005170d0
lea ecx, [ebp - 0x28]
call fcn.0042fae0
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x38], edx
xor eax, eax
jne 0x516f0d
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 0x516f2b
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x64], eax
jmp 0x516f31
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.00530950
xor ecx, ecx
jne 0x516f41
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 0x516fa7
cmp dword [ebp - 0xa0], 1
je 0x516fb1
cmp dword [ebp - 0xa0], 3
je 0x51707f
jmp 0x517094
mov ecx, dword [ebp - 0x9c]
mov byte [ecx + 0x49], 0
cmp dword [ebp - 0x14], 0x10
jb 0x516fbf
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x70], edx
jmp 0x516fc5
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.00530950
xor eax, eax
jne 0x516fd5
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x40]
mov dword [ebp - 0x2c], ecx
je 0x517048
cmp dword [ebp - 0x14], 0x10
jb 0x516ff2
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x74], edx
jmp 0x516ff8
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.00530950
xor eax, eax
jne 0x517008
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.0058aa3a
add esp, 0x10
cmp dword [ebp - 0x2c], eax
je 0x517048
mov byte [ebp - 0x45], 0
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0042fca0
mov al, byte [ebp - 0x45]
jmp 0x5170ba
mov eax, dword [ebp - 0x9c]
movzx ecx, byte [eax + 0x49]
test ecx, ecx
jne 0x51706b
mov byte [ebp - 0x46], 1
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0042fca0
mov al, byte [ebp - 0x46]
jmp 0x5170ba
cmp dword [ebp - 0x2c], 0
jne 0x51707d
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.005168d0
jmp 0x5170a9
mov byte [ebp - 0x47], 1
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0042fca0
mov al, byte [ebp - 0x47]
jmp 0x5170ba
mov byte [ebp - 0x48], 0
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0042fca0
mov al, byte [ebp - 0x48]
jmp 0x5170ba
jmp 0x516efc
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0058a6b9
mov esp, ebp
pop ebp
ret