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

Disassembly:
push ebp
sub esp, 0x60
push pe_nt_image_headers32
mov eax, 0x1018d8ef
call fcn.1015d10b
mov dword [ebp + 0x54], ecx
xor edi, edi
inc edi
push edi
xor ebx, ebx
push 2
lea ecx, [ebp - 0x10c]
mov dword [ebp + 0x5c], ebx
mov byte [ebp + 0x5b], bl
call fcn.10013500
mov ecx, dword [ebp + 0x54]
push ebx
lea eax, [ebp]
push eax
mov dword [ebp - 4], ebx
call fcn.1010286e
mov esi, str.Global.db
push esi
push eax
lea eax, [ebp - 0x10c]
push eax
mov byte [ebp - 4], 1
call fcn.10027c70
pop ecx
pop ecx
push eax
call fcn.10012340
pop ecx
pop ecx
push ebx
push edi
lea ecx, [ebp]
mov byte [ebp - 4], bl
call fcn.10001b20
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x10c]
call fcn.1000a8e0
cmp dword [eax + 0x18], 0x10
jb 0x101029e5
mov eax, dword [eax + 4]
jmp 0x101029e8
add eax, 4
push ebx
push ebx
push 3
push ebx
push edi
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push edi
lea ecx, [ebp]
mov dword [ebp + 0x5c], eax
call fcn.10001b20
cmp dword [ebp + 0x5c], 0xffffffff
jne 0x10102bef
push edi
push 2
lea ecx, [ebp - 0x8c]
call fcn.10013500
mov ecx, dword [ebp + 0x54]
push edi
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp - 4], 2
call fcn.1010286e
push esi
push eax
lea eax, [ebp - 0x8c]
push eax
mov byte [ebp - 4], 3
call fcn.10027c70
pop ecx
pop ecx
push eax
call fcn.10012340
pop ecx
pop ecx
push ebx
push edi
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 2
call fcn.10001b20
lea eax, [ebp + 0x38]
push eax
lea ecx, [ebp - 0x10c]
call fcn.1000a8e0
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 4
mov dword [ebp + 0x5c], edi
jb 0x10102a7b
mov eax, dword [eax + 4]
jmp 0x10102a7e
add eax, 4
push eax
call fcn.1002d140
test al, al
pop ecx
jne 0x10102ac3
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp - 0x8c]
call fcn.1000a8e0
cmp dword [eax + 0x18], 0x10
mov dword [ebp - 4], 5
mov dword [ebp + 0x5c], 3
jb 0x10102ab1
mov eax, dword [eax + 4]
jmp 0x10102ab4
add eax, 4
push eax
call fcn.1002d140
test al, al
pop ecx
mov byte [ebp + 0x63], 1
jne 0x10102ac6
mov byte [ebp + 0x63], bl
test byte [ebp + 0x5c], 2
je 0x10102ada
and dword [ebp + 0x5c], 0xfffffffd
push ebx
push edi
lea ecx, [ebp + 0x1c]
call fcn.10001b20
test byte [ebp + 0x5c], 1
mov dword [ebp - 4], 2
je 0x10102af1
push ebx
push edi
lea ecx, [ebp + 0x38]
call fcn.10001b20
cmp byte [ebp + 0x63], bl
je 0x10102b9f
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp - 0x10c]
call fcn.1000a8e0
mov esi, eax
lea eax, [ebp + 0x38]
push eax
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 6
call fcn.1000a8e0
cmp dword [esi + 0x18], 0x10
mov byte [ebp - 4], 7
jb 0x10102b2d
mov esi, dword [esi + 4]
jmp 0x10102b30
add esi, 4
cmp dword [eax + 0x18], 0x10
jb 0x10102b3b
mov eax, dword [eax + 4]
jmp 0x10102b3e
add eax, 4
push ebx
push esi
push eax
call fcn.100aef20
add esp, 0xc
push ebx
push edi
lea ecx, [ebp + 0x38]
mov byte [ebp + 0x63], al
call fcn.10001b20
push ebx
push edi
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 2
call fcn.10001b20
cmp byte [ebp + 0x63], bl
je 0x10102b9f
lea eax, [ebp + 0x38]
push eax
lea ecx, [ebp - 0x8c]
call fcn.1000a8e0
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 8
jb 0x10102b87
mov eax, dword [eax + 4]
jmp 0x10102b8a
add eax, 4
push eax
call fcn.10031d60
pop ecx
push ebx
push edi
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 2
call fcn.10001b20
lea eax, [ebp + 0x38]
push eax
lea ecx, [ebp - 0x8c]
call fcn.1000a8e0
cmp dword [eax + 0x18], 0x10
jb 0x10102bb9
mov eax, dword [eax + 4]
jmp 0x10102bbc
add eax, 4
push ebx
push ebx
push 3
push ebx
push edi
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push edi
lea ecx, [ebp + 0x38]
mov dword [ebp + 0x5c], eax
call fcn.10001b20
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], bl
call fcn.100064b0
cmp dword [ebp + 0x5c], 0xffffffff
je 0x10102c28
push ebx
push dword [ebp + 0x5c]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x10
jne 0x10102c1f
push ebx
lea eax, [ebp + 0x6c]
push eax
push 0x10
push dword [ebp + 0x6c]
push dword [ebp + 0x5c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10102c1f
cmp dword [ebp + 0x6c], 0x10
jne 0x10102c1f
mov byte [ebp + 0x5b], 1
push dword [ebp + 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10c]
call fcn.100064b0
mov al, byte [ebp + 0x5b]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add ebp, 0x64
leave
ret 4