Function at 0x1000cfec
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100edf60
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x101401a0]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x101401a0]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor edi, edi
mov esi, ecx
mov dword [esp + 0x1c], edi
cmp ebx, 0xffffffff
jne 0x1000d05b
xor eax, eax
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.100a1c30
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x24]
cmp dword [eax], edi
je 0x1000d081
mov ecx, dword [eax]
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x1000d081
dec dword [eax]
mov esi, dword [esi + 0x24]
mov eax, dword [esi]
lea ecx, [eax + 1]
mov dword [esi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x1000d038
cmp dword [esi + 0x54], edi
jne 0x1000d08b
or eax, 0xffffffff
jmp 0x1000d038
mov ecx, esi
call fcn.1000ed5c
cmp dword [esi + 0x44], edi
jne 0x1000d0a8
push dword [esi + 0x54]
push ebx
call fcn.1000558d
pop ecx
pop ecx
test al, al
je 0x1000d086
jmp 0x1000d07d
push edi
push 8
lea ecx, [esp + 0x60]
mov byte [esp + 0x20], bl
call fcn.1000e3a4
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x5c]
mov dword [esp + 0x8c], edi
call fcn.10014d5c
mov edi, eax
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 1
call fcn.10014d5c
mov dword [esp + 0x14], eax
jmp 0x1000d1e6
cmp edi, 1
jg 0x1000d25d
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x5c]
call fcn.10014d5c
mov ecx, eax
mov byte [esp + 0x88], 3
call fcn.100103e3
mov edi, dword [esp + 0x24]
lea ecx, [esp + 0x40]
sub edi, eax
mov byte [esp + 0x88], 0
call fcn.10002d87
test edi, edi
je 0x1000d168
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x5c]
call fcn.10014d5c
mov byte [esp + 0x88], 4
or dword [esp + 0x1c], 1
mov ecx, eax
call fcn.100103e3
push dword [esi + 0x54]
push edi
push 1
push eax
call fcn.100a6ee0
add esp, 0x10
cmp edi, eax
je 0x1000d168
mov bl, 1
jmp 0x1000d16a
xor bl, bl
and dword [esp + 0x88], 0
test byte [esp + 0x1c], 1
je 0x1000d187
and dword [esp + 0x1c], 0xfffffffe
lea ecx, [esp + 0x4c]
call fcn.10002d87
test bl, bl
jne 0x1000d274
lea eax, [esp + 0x18]
mov byte [esi + 0x49], 1
cmp dword [esp + 0x20], eax
jne 0x1000d29c
test edi, edi
jne 0x1000d1bc
cmp dword [esp + 0x6c], 0x20
jae 0x1000d274
push edi
push 8
lea ecx, [esp + 0x60]
call fcn.1000352f
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x5c]
call fcn.10014d5c
mov edi, eax
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x8c], 1
call fcn.10014d5c
mov dword [esp + 0x14], eax
mov ecx, edi
mov byte [esp + 0x88], 2
call fcn.100103e3
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x6c]
mov ebx, eax
call fcn.100103e3
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x24]
push eax
add edi, ebx
push edi
push dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x29]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esi + 0x4c]
push eax
call dword [edx + 0x14]
lea ecx, [esp + 0x34]
mov edi, eax
mov byte [esp + 0x88], 1
call fcn.10002d87
lea ecx, [esp + 0x28]
mov byte [esp + 0x88], 0
call fcn.10002d87
test edi, edi
jns 0x1000d0ee
jmp 0x1000d274
cmp edi, 3
jne 0x1000d274
push dword [esi + 0x54]
push dword [esp + 0x1c]
call fcn.1000558d
pop ecx
pop ecx
test al, al
jne 0x1000d29c
or esi, 0xffffffff
or dword [esp + 0x88], 0xffffffff
push 0
push 1
lea ecx, [esp + 0x60]
call fcn.100015c0
lea ecx, [esp + 0x58]
call fcn.10002740
mov eax, esi
jmp 0x1000d038
mov esi, dword [ebp + 8]
jmp 0x1000d277