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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x10090b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp + 0x14]
push 0x80000000
push eax
mov dword [ebp - 0x44], ecx
mov edi, 0x80004005
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x34], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x100219f
push 0x2714
call fcn.01003655
jmp 0x1002470
lea eax, [ebp - 0x48]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x48], esi
je 0x10021bc
push 0x2716
jmp 0x1002438
push 2
pop esi
cmp eax, esi
jae 0x10021cd
push 0x2715
jmp 0x1002438
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x2c]
push eax
push esi
lea eax, [ebp - 0x34]
push eax
push ebx
call edi
test eax, eax
je 0x100241d
cmp dword [ebp - 0x2c], esi
jne 0x100241d
cmp dword [ebp - 0x34], 0xfeff
jne 0x100241d
sub dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x1c]
shr esi, 1
xor ecx, ecx
push 2
pop edx
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x100223a
push 0x2716
call fcn.01003655
mov edi, 0x8007000e
jmp 0x100243d
push 0
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x1c]
push eax
push ebx
call edi
test eax, eax
je 0x1002402
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x2c], eax
jne 0x1002402
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x28]
lea ecx, [edi + esi*2]
xor eax, eax
lea ebx, [ecx - 2]
mov word [ecx], ax
mov eax, edi
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x1c], 1
cmp edi, ebx
jae 0x1002298
push 0xa
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x1002298
inc dword [ebp - 0x1c]
inc eax
inc eax
cmp eax, ebx
jb 0x1002280
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x10022cc
push 0x2716
call fcn.01003655
pop ecx
mov edi, 0x8007000e
jmp 0x100244d
and dword [ebp - 0x20], 0
mov esi, edi
cmp edi, ebx
jae 0x10023fe
mov ebx, dword [sym.imp.msvcrt.dll_iswcntrl]
xor edi, edi
cmp word [esi], di
je 0x10023a1
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x1c]
jae 0x10023a1
movzx eax, word [esi]
push eax
call dword [sym.imp.msvcrt.dll_iswspace]
pop ecx
test eax, eax
jne 0x1002311
movzx eax, word [esi]
push eax
call ebx
pop ecx
test eax, eax
je 0x100231d
xor eax, eax
mov word [esi], ax
inc esi
inc esi
cmp word [esi], di
jne 0x10022f7
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
lea eax, [eax + ecx*4]
mov dword [eax], esi
mov dword [ebp - 0x4c], eax
cmp word [esi], di
je 0x100236d
push 2
pop edi
jmp 0x100233b
cmp word [esi], 0
je 0x100236d
add esi, edi
movzx eax, word [esi]
push eax
call ebx
pop ecx
test eax, eax
je 0x1002335
cmp word [esi], 0
je 0x100236d
cmp word [esi], 0xa
je 0x1002360
xor eax, eax
mov word [esi], ax
add esi, edi
cmp word [esi], ax
jne 0x100234e
cmp word [esi], 0
je 0x100236d
xor eax, eax
mov word [esi], ax
add esi, edi
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax]
test eax, eax
je 0x1002398
lea ecx, [ebp - 0x30]
push ecx
mov edi, 0x80
push edi
push eax
call fcn.010020fa
test eax, eax
jl 0x10023ce
cmp dword [ebp - 0x30], edi
jae 0x10023ce
cmp dword [ebp - 0x30], 0
jbe 0x1002398
inc dword [ebp - 0x20]
cmp esi, dword [ebp - 0x40]
jb 0x10022e0
mov eax, 0x2dc6c0
cmp dword [ebp - 0x20], eax
jbe 0x10023fe
push eax
push 0x1001724
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.0100209b
add esp, 0x10
test eax, eax
jne 0x10023f7
lea eax, [ebp - 0x18]
push eax
push 0x271f
jmp 0x10023f0
push 0x7f
push 0x1001724
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.0100209b
add esp, 0x10
test eax, eax
jne 0x10023f7
lea eax, [ebp - 0x18]
push eax
push 0x271e
call fcn.01003655
pop ecx
pop ecx
mov edi, 0x80004005
jmp 0x100244d
xor edi, edi
jmp 0x1002474
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1002416
and eax, 0xffff
or eax, 0x80070000
push 0x271d
jmp 0x1002436
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1002431
and eax, 0xffff
or eax, 0x80070000
push 0x2719
mov edi, eax
call fcn.01003655
pop ecx
test ebx, ebx
je 0x1002449
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jge 0x1002474
xor esi, esi
cmp dword [ebp - 0x28], esi
je 0x1002460
push dword [ebp - 0x28]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x24], esi
je 0x1002471
push dword [ebp - 0x24]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
mov dword [ebp - 0x24], esi
pop ecx
mov dword [ebp - 0x20], esi
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x38]
mov dword [ecx], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x3c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x44]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01003059
leave
ret 0x10