Function at 0x100af6e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x100df00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, edx
mov eax, ecx
mov edx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], eax
call fcn.100aeb70
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
je 0x100af8d3
movzx eax, word [ebx + 4]
lea eax, [eax + eax*8]
shl eax, 2
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebx + 0xc], eax
test eax, eax
je 0x100af8c7
movzx ecx, word [ebx + 4]
lea ecx, [ecx + ecx*8]
shl ecx, 2
push ecx
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov edi, dword [ebx + 8]
add esp, 0xc
mov esi, dword [ebx + 0xc]
xor ebx, ebx
cmp cx, word [eax + 4]
jae 0x100af838
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseek]
push 0
push edi
push dword [ebp - 0x20]
call eax
add esp, 0xc
cmp eax, edi
jne case.default.0x100af7dc
push 0x16
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
add esp, 0xc
cmp eax, 0x16
jne case.default.0x100af7dc
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], 0
movzx eax, word [ebp - 0x18]
mov word [esi], ax
movzx eax, word [ebp - 0x16]
mov word [esi + 2], ax
movzx eax, word [ebp - 0x14]
mov word [esi + 4], ax
movzx eax, word [ebp - 0x12]
mov word [esi + 6], ax
movzx eax, word [ebp - 0x10]
mov word [esi + 8], ax
mov eax, dword [ebp - 0xe]
mov dword [esi + 0xa], eax
mov eax, dword [ebp - 0xa]
mov dword [esi + 0xe], eax
mov edx, dword [ebp - 0x18]
and edx, 0xf
cmp edx, 4
ja case.default.0x100af7dc
jmp dword [edx*4 + 0x100af8e8]
mov dword [esi + 0x18], 0
jmp 0x100af80a
mov ecx, dword [ebp - 0x28]
movsx eax, byte [ecx + 0x12]
push eax
lea eax, [ecx + 0x60]
mov ecx, dword [ebp - 0x20]
push eax
call fcn.100af480
add esp, 8
mov dword [esi + 0x18], eax
test eax, eax
je case.default.0x100af7dc
push 1
push 0
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseek]
mov dword [esi + 0x14], eax
inc ebx
mov eax, dword [ebp - 0x24]
add esp, 0xc
add edi, dword [ebp - 0x1c]
add esi, 0x24
movzx eax, word [eax + 4]
cmp ebx, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseek]
jl 0x100af762
mov eax, dword [ebp - 0x20]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100be194
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x100af8b1
mov eax, 0xffff
add word [esi], ax
dec ebx
mov ax, word [esi]
and eax, 0xf
cmp eax, 1
je 0x100af869
cmp eax, 2
jne 0x100af8a8
mov eax, dword [0x100edc64]
xor edx, edx
mov edi, dword [esi + 0x18]
test eax, eax
je 0x100af8a8
lea ecx, [eax + 0x30]
cmp ecx, edi
je 0x100af888
mov edx, eax
mov eax, dword [eax]
test eax, eax
jne 0x100af877
jmp 0x100af8a8
add dword [eax + 8], 0xffffffff
jne 0x100af8a8
mov ecx, dword [eax]
test edx, edx
je 0x100af898
mov dword [edx], ecx
jmp 0x100af89e
mov dword [0x100edc64], ecx
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, 0xffff
test ebx, ebx
jne 0x100af855
mov ebx, dword [ebp - 0x24]
push dword [ebx + 0xc]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [ebx + 0xc], 0
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
add esp, 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100be194
mov esp, ebp
pop ebp
ret