Function at 0x10012ef0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.10075d90
mov eax, dword [0x10091628]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
cmp dword [eax + 0x14], 0x10
jb 0x10012f16
mov eax, dword [eax]
push 0x10079ddc
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [ebp - 0x1018], eax
test eax, eax
jne 0x10012f41
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10075b41
mov esp, ebp
pop ebp
ret
push esi
push edi
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, eax
add esp, 0x10
test edi, edi
jle 0x100130e6
mov edx, dword [ebx + 0x14]
mov eax, edx
mov esi, dword [ebx + 0x10]
sub eax, esi
mov dword [ebp - 0x100c], edx
cmp edi, eax
ja 0x10012fa4
lea eax, [esi + edi]
mov dword [ebx + 0x10], eax
mov eax, ebx
cmp edx, 0x10
jb 0x10012f88
mov eax, dword [ebx]
add esi, eax
lea eax, [ebp - 0x1004]
push edi
push eax
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x100130bf
mov eax, bind
sub eax, esi
cmp eax, edi
jb 0x1001311d
lea ecx, [esi + edi]
or ecx, 0xf
cmp ecx, 0x7fffffff
jbe 0x10012fc8
mov ecx, bind
jmp 0x10012ff5
mov eax, edx
shr eax, 1
mov dword [ebp - 0x1008], eax
mov eax, bind
sub eax, dword [ebp - 0x1008]
cmp edx, eax
jbe 0x10012fe8
mov ecx, bind
jmp 0x10012ff5
mov eax, dword [ebp - 0x1008]
add eax, edx
cmp ecx, eax
cmovb ecx, eax
lea eax, [ecx + 1]
mov dword [ebp - 0x1008], ecx
push eax
mov ecx, ebx
call fcn.10006b50
lea ecx, [esi + edi]
mov dword [ebp - 0x1014], eax
mov dword [ebx + 0x10], ecx
mov ecx, dword [ebp - 0x1008]
mov dword [ebx + 0x14], ecx
lea ecx, [eax + esi]
mov dword [ebp - 0x1008], ecx
add ecx, edi
cmp dword [ebp - 0x100c], 0x10
mov dword [ebp - 0x1010], ecx
push esi
jb 0x10013091
mov ecx, dword [ebx]
mov esi, ecx
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
push edi
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 0x1008]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x1010]
add esp, 0x18
mov ecx, dword [ebp - 0x100c]
inc ecx
mov byte [eax], 0
cmp ecx, 0x1000
jb 0x10013085
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x10013117
mov esi, edx
push ecx
push esi
call fcn.10075b7f
add esp, 8
jmp 0x100130b7
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
push edi
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 0x1008]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x1010]
add esp, 0x18
mov byte [eax], 0
mov eax, dword [ebp - 0x1014]
mov dword [ebx], eax
push dword [ebp - 0x1018]
lea eax, [ebp - 0x1004]
push 0x1000
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x10012f65
mov ebx, dword [ebp - 0x1018]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
neg eax
push ebx
sbb esi, esi
and esi, 0xfffffffe
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, esi
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.10075b41
mov esp, ebp
pop ebp
ret
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.10006b20
int3