Function at 0x596440
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x7ce4f0]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x9c], ecx
mov eax, dword [ebp - 0x9c]
cmp dword [eax + 0x44], 0
je 0x596473
mov ecx, dword [ebp - 0x9c]
movzx edx, byte [ecx + 0x49]
test edx, edx
jne 0x59647f
mov al, 1
jmp 0x59669a
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 0x5964be
xor al, al
jmp 0x59669a
lea ecx, [ebp - 0x51]
mov dword [ebp - 0x50], ecx
push 0
push 0
lea ecx, [ebp - 0x28]
call fcn.0040f69b
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.004083f0
lea ecx, [ebp - 0x28]
call fcn.00405af1
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x38], edx
xor eax, eax
jne 0x5964ed
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 0x59650b
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x64], eax
jmp 0x596511
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.0040cc2f
xor ecx, ecx
jne 0x596521
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 0x596587
cmp dword [ebp - 0xa0], 1
je 0x596591
cmp dword [ebp - 0xa0], 3
je 0x59665f
jmp 0x596674
mov ecx, dword [ebp - 0x9c]
mov byte [ecx + 0x49], 0
cmp dword [ebp - 0x14], 0x10
jb 0x59659f
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x70], edx
jmp 0x5965a5
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.0040cc2f
xor eax, eax
jne 0x5965b5
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x40]
mov dword [ebp - 0x2c], ecx
je 0x596628
cmp dword [ebp - 0x14], 0x10
jb 0x5965d2
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x74], edx
jmp 0x5965d8
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.0040cc2f
xor eax, eax
jne 0x5965e8
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.00637a75
add esp, 0x10
cmp dword [ebp - 0x2c], eax
je 0x596628
mov byte [ebp - 0x45], 0
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0040f69b
mov al, byte [ebp - 0x45]
jmp 0x59669a
mov eax, dword [ebp - 0x9c]
movzx ecx, byte [eax + 0x49]
test ecx, ecx
jne 0x59664b
mov byte [ebp - 0x46], 1
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0040f69b
mov al, byte [ebp - 0x46]
jmp 0x59669a
cmp dword [ebp - 0x2c], 0
jne 0x59665d
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.004069f1
jmp 0x596689
mov byte [ebp - 0x47], 1
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0040f69b
mov al, byte [ebp - 0x47]
jmp 0x59669a
mov byte [ebp - 0x48], 0
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.0040f69b
mov al, byte [ebp - 0x48]
jmp 0x59669a
jmp 0x5964dc
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.006376f4
mov esp, ebp
pop ebp
ret