Function at 0x59cb20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x59cb3a
or eax, 0xffffffff
jmp 0x59cea7
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0xc], 0
je 0x59cb52
cmp dword [ebp - 0x14], 0x10
jg 0x59cb5a
or eax, 0xffffffff
jmp 0x59cea7
mov byte [ebp - 1], 1
mov byte [ebp - 0x19], 0
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 3]
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + 2]
shl eax, 8
or ecx, eax
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + 1]
shl eax, 0x10
or ecx, eax
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx]
shl eax, 0x18
or ecx, eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp + 0x14]
cmp dword [ecx + 0x10], 1
jne 0x59cc5f
mov edx, dword [ebp + 0x14]
cmp dword [edx + 0x14], 0
jne 0x59cc3c
mov eax, dword [ebp - 0x18]
mov byte [eax + 0x18], 1
mov byte [ebp - 0x19], 1
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 5]
and edx, 0x1f
mov eax, dword [ebp - 0x18]
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 6]
shl edx, 3
mov eax, dword [ebp - 0x18]
mov dword [eax + 8], edx
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 7]
shl edx, 3
mov eax, dword [ebp - 0x18]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x1c]
add edx, 1
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x1c], edx
mov ecx, dword [ebp + 0xc]
add ecx, 0x10
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0x10]
sub edx, 0x10
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 8]
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + 9]
shl eax, 8
or ecx, eax
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + 0xa]
shl eax, 0x10
or ecx, eax
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + 0xb]
shl eax, 0x18
or ecx, eax
mov dword [ebp - 0x10], ecx
jmp 0x59cc5d
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x1c]
add edx, 1
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x1c], edx
mov ecx, dword [ebp + 0xc]
add ecx, 8
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0x10]
sub edx, 8
mov dword [ebp - 0x14], edx
jmp 0x59ccb9
mov eax, dword [ebp + 0x14]
cmp dword [eax + 0x10], 2
jne 0x59ccb9
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp + 0x10]
sub edx, 8
push edx
mov eax, dword [ebp - 0x18]
add eax, 0x420
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 8
push ecx
call fcn.0059ca10
add esp, 0x10
mov byte [ebp - 1], 0
mov edx, dword [ebp - 0x18]
mov byte [edx + 0x19], 1
mov eax, dword [ebp - 0x18]
add eax, 0x420
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 0x4c]
mov dword [ecx + 0x14], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 0x50]
mov dword [ecx + 0x10], eax
mov ecx, dword [ebp - 0x18]
movzx edx, byte [ecx + 0x18]
test edx, edx
jne 0x59cccc
or eax, 0xffffffff
jmp 0x59cea7
movzx eax, byte [ebp - 1]
test eax, eax
je 0x59cd0e
mov ecx, dword [0x6d4500]
mov dword [ebp - 0x2c], ecx
movzx edx, byte [ebp - 0x19]
test edx, edx
je 0x59ccee
mov dword [ebp - 0x28], 0x10
jmp 0x59ccf5
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
push ecx
push 4
push 1
push 0x6d4500
call fcn.005e96c4
add esp, 0x10
jmp 0x59cd35
mov edx, dword [str.01wb00dc]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
push ecx
push 4
push 1
push str.01wb00dc
call fcn.005e96c4
add esp, 0x10
movzx edx, byte [ebp - 1]
test edx, edx
je 0x59cdae
movzx eax, byte [ebp - 0x19]
test eax, eax
je 0x59cdae
mov ecx, dword [ebp - 0x14]
add ecx, 8
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
push eax
push 4
push 1
lea ecx, [ebp - 0x14]
push ecx
call fcn.005e96c4
add esp, 0x10
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
push eax
push 4
push 1
push 0x6d44f8
call fcn.005e96c4
add esp, 0x10
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push edx
push 4
push 1
lea eax, [ebp - 0x10]
push eax
call fcn.005e96c4
add esp, 0x10
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x14]
sub eax, 8
push eax
push 1
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.005e96c4
add esp, 0x10
jmp 0x59cddc
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
push eax
push 4
push 1
lea ecx, [ebp - 0x14]
push ecx
call fcn.005e96c4
add esp, 0x10
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push 1
mov edx, dword [ebp - 0xc]
push edx
call fcn.005e96c4
add esp, 0x10
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x76724]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x76724]
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + eax + 8]
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x76724], edx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x76720]
shl eax, 4
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax + 0x1420]
mov eax, dword [ebp - 0x2c]
mov dword [edx], eax
mov ecx, dword [ebp - 0x28]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x24]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x20]
mov dword [edx + 0xc], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x76720]
add eax, 1
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0x76720], eax
mov edx, dword [ebp - 0x18]
cmp dword [edx + 0x76720], 0x7530
jl 0x59cea5
push 0x681518
mov eax, dword [ebp - 0x18]
add eax, 0x20
push eax
call fcn.005e918f
add esp, 8
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
push ecx
push 0x75300
push 1
mov edx, dword [ebp - 0x18]
add edx, 0x1420
push edx
call fcn.005e96c4
add esp, 0x10
mov eax, dword [ebp - 0x30]
push eax
call fcn.005e904f
add esp, 4
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0x76720], 0
xor eax, eax
mov esp, ebp
pop ebp
ret