Function at 0x10029720
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1012f138
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push esi
push edi
mov eax, dword [0x101870dc]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x34], 0
lea ecx, [ebp - 0x30]
call fcn.1002a000
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0xffffffff
cmp dword [ebp + 8], 0
je 0x100297b2
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
test ecx, ecx
je 0x100297b2
cmp dword [ebp + 0xc], 0
jne 0x100297be
mov dword [ebp - 0x24], 0x57
jmp 0x1002998f
cmp dword [ebp + 0x10], 0
je 0x100297ca
cmp dword [ebp + 0x14], 0
jne 0x100297d6
mov dword [ebp - 0x24], 0x57
jmp 0x1002998f
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0x14
jae 0x100297ea
mov dword [ebp - 0x24], 0x7a
jmp 0x1002998f
push 0
push 0x80
push 3
push 0
push 1
push closesocket
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x1002981d
jmp 0x1002998f
mov ecx, dword [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x30]
call fcn.1002a050
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2c], eax
mov esi, dword [ebp - 0x2c]
xor edi, edi
mov eax, dword [ebp - 0x10]
xor edx, edx
mov cl, 0x20
call fcn.1010be60
or esi, eax
or edi, edx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], edi
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x28]
push edx
push 3
call fcn.10012d17
add esp, 0xc
cmp dword [ebp - 0x24], 0x220a1001
je 0x10029875
jmp 0x1002998f
lea eax, [ebp - 0x24]
push eax
push 0x10000
call fcn.10004244
add esp, 8
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x10029894
jmp 0x1002998f
cmp dword [ebp - 0x18], 0
ja 0x100298a4
cmp dword [ebp - 0x1c], 0
jbe 0x10029937
cmp dword [ebp - 0x18], 0
ja 0x100298b3
cmp dword [ebp - 0x1c], 0x10000
jbe 0x100298bc
mov dword [ebp - 0x34], 0x10000
jmp 0x100298c2
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x40], 0
push 0
lea edx, [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100298f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x1002998f
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov dword [ecx + 4], edx
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.10012dd1
add esp, 0xc
cmp dword [ebp - 0x24], 0x220a1001
je 0x1002991d
jmp 0x1002998f
mov eax, dword [ebp - 0x34]
xor ecx, ecx
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, dword [ebp - 0x18]
sbb eax, ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], eax
jmp 0x10029894
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.10012dfb
add esp, 8
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x10029952
jmp 0x1002998f
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 4], 0x14
je 0x1002996b
mov dword [ebp - 0x24], 0x3630
jmp 0x1002998f
push 0x14
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.10109740
add esp, 0xc
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0x14
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x3c], 0
je 0x100299a1
mov edx, dword [ebp - 0x3c]
push edx
call fcn.1000430d
add esp, 4
cmp dword [ebp - 0x38], 0
je 0x100299b3
mov eax, dword [ebp - 0x38]
push eax
call fcn.1000430d
add esp, 4
cmp dword [ebp - 0x28], 0
je 0x100299c5
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.100043d1
add esp, 4
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x44], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.1002a020
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret