Function at 0x102990b
Capabilities:
Get file size
Write file on windows

Disassembly:
push 0x24c
mov eax, 0x106e58c
call fcn.0105bd31
mov eax, dword [ebp + 0xc]
or dword [ebp - 0x23c], 0xffffffff
xor ebx, ebx
mov dword [ebp - 0x240], eax
xor eax, eax
lea edi, [ebp - 0x244]
mov dword [ebp - 0x248], ebx
mov esi, ecx
stosd dword es:[edi], eax
mov eax, dword [0x1075004]
mov edi, 0x1075004
cmp eax, edi
je 0x1029969
test byte [eax + 0x1c], 4
je 0x1029969
cmp byte [eax + 0x19], 5
jb 0x1029969
push 0x1002028
push 0x53
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
mov eax, 0x1001d44
cmp dword [ebp + 8], ebx
je 0x1029978
mov eax, 0x1001d28
push eax
push esi
push 0x10019a0
lea eax, [ebp - 0x21c]
push 0x104
push eax
call fcn.01009acc
mov esi, eax
add esp, 0x14
test esi, esi
jge 0x10299de
mov eax, dword [0x1075004]
cmp eax, edi
je 0x10299c1
test byte [eax + 0x1c], 4
je 0x10299c1
cmp byte [eax + 0x19], 2
jb 0x10299c1
push esi
push 0x1002028
push 0x54
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
mov eax, esi
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x10299d7
movzx ebx, si
jmp 0x1029bc9
mov ebx, esi
jmp 0x1029bc9
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x21c]
push eax
call fcn.0105e5e0
mov esi, eax
mov dword [ebp - 0x23c], esi
cmp esi, 0xffffffff
jne 0x1029a4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x1075004]
cmp eax, edi
je 0x1029bc9
test byte [eax + 0x1c], 4
je 0x1029bc9
cmp byte [eax + 0x19], 2
jb 0x1029bc9
push ebx
push 0x1002028
push 0x55
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
jmp 0x1029bc9
lea eax, [ebp - 0x248]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1029a8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x1075004]
cmp eax, edi
je 0x1029bc9
test byte [eax + 0x1c], 4
je 0x1029bc9
cmp byte [eax + 0x19], 2
jb 0x1029bc9
push ebx
push 0x1002028
push 0x56
jmp 0x1029a3a
xor eax, eax
cmp dword [ebp - 0x248], eax
jne 0x1029c6e
cmp dword [ebp - 0x244], eax
jne 0x1029c6e
push eax
lea eax, [ebp - 0x254]
push eax
push 2
lea eax, [ebp - 0x250]
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x250], 0xfeff
call esi
test eax, eax
jne 0x1029b07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x1075004]
cmp eax, edi
je 0x1029bc9
test byte [eax + 0x1c], 4
je 0x1029bc9
cmp byte [eax + 0x19], 2
jb 0x1029bc9
push ebx
push 0x1002028
push 0x57
jmp 0x1029a3a
lea ecx, [ebp - 0x238]
call fcn.01028d84
and dword [ebp - 4], 0
cmp dword [ebp + 8], 0
mov byte [ebp - 4], 1
mov eax, 0x10019d4
je 0x1029b2a
mov eax, 0x1002164
lea ecx, [ebp - 0x238]
push ecx
push eax
call fcn.01029239
cmp dword [ebp - 0x220], 8
mov eax, dword [ebp - 0x234]
jae 0x1029b4c
lea eax, [ebp - 0x234]
push 0
lea ecx, [ebp - 0x254]
push ecx
mov ecx, dword [ebp - 0x224]
add ecx, ecx
push ecx
push eax
push dword [ebp - 0x23c]
call esi
test eax, eax
jne 0x1029bac
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x1075004]
cmp eax, edi
je 0x1029b9b
test byte [eax + 0x1c], 4
je 0x1029b9b
cmp byte [eax + 0x19], 2
jb 0x1029b9b
push ebx
push 0x1002028
push 0x59
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
push 0
push 1
lea ecx, [ebp - 0x238]
call fcn.01025bbc
jmp 0x1029bc9
push 0
push 1
lea ecx, [ebp - 0x238]
call fcn.01025bbc
mov esi, dword [ebp - 0x23c]
mov eax, dword [ebp - 0x240]
mov dword [eax], esi
test ebx, ebx
je 0x1029d45
mov eax, dword [ebp - 0x240]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x1029bee
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x240]
or dword [eax], 0xffffffff
mov esi, dword [ebp + 8]
test esi, esi
jne 0x1029cb8
and dword [0x107805c], esi
jmp 0x1029cbf
push 2
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1029bc1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x1075004]
cmp eax, edi
je 0x1029bc9
test byte [eax + 0x1c], 4
je 0x1029bc9
cmp byte [eax + 0x19], 2
jb 0x1029bc9
push ebx
push 0x1002028
push 0x5a
jmp 0x1029a3a
and dword [0x1078060], 0
xor eax, eax
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x238], ebx
mov word [ebp - 0x234], ax
call fcn.01009b2b
push eax
push dword [0x1078064]
neg esi
push 0xc0007d3c
sbb esi, esi
push 2
add esi, 3
push esi
push 1
call fcn.0105dbc9
add esp, 0x18
cmp dword [ebp - 0x23c], 0xffffffff
je 0x1029d45
push dword [ebp - 0x23c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1029d45
mov eax, dword [0x1075004]
cmp eax, edi
je 0x1029d45
test byte [eax + 0x1c], 4
je 0x1029d45
cmp byte [eax + 0x19], 2
jb 0x1029d45
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1075004]
push 0x1002028
push 0x5b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0102ca9d
mov eax, ebx
call fcn.0105bd9c
ret 8