Function at 0x10010680
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x614
mov eax, dword [0x10056b88]
xor eax, esp
mov dword [esp + 0x610], eax
push ebp
push esi
mov esi, dword [esp + 0x624]
push 0x1ff
lea eax, [esp + 0x41d]
push 0
push eax
mov byte [esp + 0x424], 0
call fcn.10024c80
push 0x3ff
lea ecx, [esp + 0x29]
push 0
push ecx
mov byte [esp + 0x30], 0
call fcn.10024c80
add esp, 0x18
push 0
push 0
push 0x200
lea edx, [esp + 0x424]
push edx
push 0xffffffffffffffff
push 0x102e5240
push 0
push 1
call dword [0x100440c8]
lea eax, [esp + 0x418]
add eax, 0xffffffff
mov edi, edi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x10010700
mov ecx, dword [0x10045998]
mov edx, dword [0x1004599c]
mov dword [eax], ecx
mov ecx, dword [0x100459a0]
mov dword [eax + 4], edx
mov dx, word [0x100459a4]
mov dword [eax + 8], ecx
mov cl, byte [0x100459a6]
mov word [eax + 0xc], dx
lea edx, [esp + 0x418]
push 0x100443c0
push edx
mov byte [eax + 0xe], cl
call fcn.100255d7
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x100108de
push edi
push 0x400
lea eax, [esp + 0x20]
push 0
push eax
call fcn.10024c80
push 0x102e5840
push 0x400
lea ecx, [esp + 0x30]
push ecx
push 0x10044668
push 0x10044664
push 0x10044304
call fcn.10017460
lea edi, [esp + 0x40]
add esp, 0x24
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x10010796
mov dx, word [0x10044660]
lea eax, [esp + 0x1c]
mov word [edi], dx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100107b1
push 0x102e5840
sub eax, edx
push 0x400
lea eax, [esp + eax + 0x24]
push eax
push 0x10044624
push 0x1004461c
push 0x10044304
call fcn.10017460
add esp, 0x18
lea ecx, [esp + 0xc]
push ecx
call dword [0x100440cc]
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100107f4
movzx ecx, word [esp + 0x16]
sub eax, edx
movzx edx, word [esp + 0x18]
push edx
movzx edx, word [esp + 0x18]
push ecx
movzx ecx, word [esp + 0x1a]
push edx
movzx edx, word [esp + 0x1a]
push ecx
movzx ecx, word [esp + 0x1c]
push edx
push ecx
lea edx, [esp + eax + 0x34]
push 0x10045978
push edx
call fcn.10024ba4
mov eax, esi
add esp, 0x20
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x10010840
lea edi, [esp + 0x1c]
sub eax, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x10010852
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1c]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x10010871
mov ax, word [0x1004437c]
push 2
push 0
push ebp
mov word [edi], ax
call fcn.10026035
add esp, 0xc
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
pop edi
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100108a0
push ebp
sub eax, edx
push eax
lea ecx, [esp + 0x20]
push 1
push ecx
call fcn.10024e59
push ebp
call fcn.10025497
add esp, 0x14
pop esi
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x610]
xor ecx, esp
call fcn.10024c3b
add esp, 0x614
ret
push 1
push 0x10044fa5
push 0x10045960
call fcn.100202e0
mov ecx, dword [esp + 0x624]
add esp, 0xc
pop esi
pop ebp
xor ecx, esp
or eax, 0xffffffff
call fcn.10024c3b
add esp, 0x614
ret