Function at 0x10021ee0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2da4
call fcn.1009d490
mov eax, dword [0x100df0c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
push 0x7f
mov dword [ebp - 0x2d9c], eax
mov edi, ecx
lea eax, [ebp - 0x2d90]
mov dword [ebp - 0x2da4], esi
push 0
push eax
mov dword [ebp - 0x2da0], 0
mov byte [ebp - 0x2d95], 1
mov dword [ebp - 0x2d94], 0
call fcn.1009c990
xor eax, eax
push 0x2d08
push eax
mov dword [ebp - 0x2d10], eax
lea eax, [ebp - 0x2d0c]
push eax
call fcn.1009c990
mov eax, dword [0x101f42ac]
add eax, 0x35b10
push 0x2d0c
push eax
lea eax, [ebp - 0x2d10]
push eax
call fcn.1009b860
add esp, 0x24
cmp dword [edi + 0x280], 0xffffffff
jne 0x10021fb9
push 0
lea eax, [ebp - 0x2da0]
push eax
push ebx
push dword [ebp - 0x2d9c]
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, eax
mov eax, dword [ebp - 0x2da0]
pop edi
mov dword [esi], eax
test ecx, ecx
pop esi
setne al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1009bea4
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 0x49c]
cmp eax, ebx
jb 0x10022067
push ebx
lea esi, [edi + 0x4b0]
push esi
push dword [ebp - 0x2d9c]
call fcn.1009b860
mov eax, dword [edi + 0x49c]
sub eax, ebx
push eax
lea eax, [ebx + 0x4b0]
add eax, edi
push eax
push esi
call fcn.1009c030
mov eax, dword [ebp - 0x2da4]
add esp, 0x18
sub dword [edi + 0x49c], ebx
mov dword [eax], ebx
add dword [edi + 0x284], ebx
mov ecx, dword [edi + 0x28c]
mov eax, ecx
adc dword [edi + 0x288], 0
mov edx, dword [edi + 0x290]
or eax, edx
je 0x10022052
mov esi, dword [0x101f4068]
test esi, esi
je 0x10022052
mov ebx, dword [edi + 0x288]
mov eax, dword [edi + 0x284]
cmp edx, ebx
jb 0x10022052
ja 0x10022042
cmp ecx, eax
jb 0x10022052
push edx
push ecx
push ebx
push eax
lea eax, [edi + 0x294]
push eax
call esi
add esp, 0x14
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1009bea4
mov esp, ebp
pop ebp
ret 0xc
test eax, eax
jne 0x1002222f
push 0
lea ecx, [ebp - 0x2da0]
push ecx
push 0x100000
lea eax, [edi + 0x4b0]
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x2da0]
test eax, eax
mov dword [esi], ecx
setne byte [ebp - 0x2d95]
add dword [edi + 0x49c], ecx
cmp dword [esi], 0
jne 0x100220b8
mov dword [edi + 0x4a0], 1
jmp 0x1002222f
cmp dword [0x101f4078], 0
je 0x1002222f
cmp dword [0x101f4913], 0
je 0x1002222f
mov eax, dword [0x101f46b4]
lea edx, [edi + 0x4b0]
mov dword [ebp - 0x2d88], eax
mov eax, dword [0x101f44b0]
movdqu xmm0, xmmword [0x101f48d2]
mov dword [ebp - 0x2d90], eax
mov eax, dword [0x101f48ce]
mov dword [ebp - 0x2d80], eax
lea eax, [ebp - 0x2d10]
mov dword [ebp - 0x2d6e], eax
movzx eax, word [0x101f46c2]
mov word [ebp - 0x2d74], ax
movzx eax, word [0x101f46b8]
mov word [ebp - 0x2d66], ax
movzx eax, word [0x101f46ba]
mov word [ebp - 0x2d64], ax
movzx eax, word [0x101f46bc]
mov word [ebp - 0x2d62], ax
movzx eax, word [0x101f46be]
mov word [ebp - 0x2d60], ax
movzx eax, word [0x101f46c0]
mov word [ebp - 0x2d5e], ax
movzx eax, word [0x101f46c4]
movdqu xmmword [ebp - 0x2d52], xmm0
mov word [ebp - 0x2d5c], ax
movdqu xmm0, xmmword [0x101f48e2]
mov eax, dword [0x101f46c6]
mov dword [ebp - 0x2d5a], eax
mov eax, dword [0x101f46ca]
movdqu xmmword [ebp - 0x2d42], xmm0
push 1
movdqu xmm0, xmmword [0x101f48f2]
push ecx
mov dword [ebp - 0x2d78], ecx
mov ecx, dword [0x101f42ac]
mov dword [ebp - 0x2d56], eax
mov al, byte [0x101f4912]
movdqu xmmword [ebp - 0x2d32], xmm0
mov byte [ebp - 0x2d12], al
lea eax, [ecx + 0x35610]
movdqu xmm0, xmmword [0x101f4902]
push edx
mov dword [ebp - 0x2d7c], edx
mov dword [ebp - 0x2d8c], 0x101f44b4
mov dword [ebp - 0x2d94], 0x101f42b0
mov dword [ebp - 0x2d84], 0x101f46ce
mov dword [ebp - 0x2d6a], 1
movdqu xmmword [ebp - 0x2d22], xmm0
push eax
mov eax, dword [ecx + 0x98]
call eax
lea eax, [ebp - 0x2d94]
push eax
call dword [0x101f4078]
add esp, 0x14
mov dword [ebp - 0x2d72], 1
mov eax, dword [edi + 0x49c]
cmp eax, ebx
jb 0x10022256
push ebx
lea esi, [edi + 0x4b0]
push esi
push dword [ebp - 0x2d9c]
call fcn.1009b860
mov eax, 0x100000
jmp 0x10021fe0
push eax
lea eax, [edi + 0x4b0]
push eax
push dword [ebp - 0x2d9c]
call fcn.1009b860
mov eax, dword [edi + 0x49c]
add esp, 0xc
mov dword [esi], eax
mov edx, dword [edi + 0x28c]
mov ecx, dword [edi + 0x290]
mov dword [edi + 0x49c], 0
mov eax, dword [esi]
add dword [edi + 0x284], eax
mov eax, edx
adc dword [edi + 0x288], 0
or eax, ecx
je 0x100222cb
mov esi, dword [0x101f4068]
test esi, esi
je 0x100222cb
cmp ecx, dword [edi + 0x288]
jb 0x100222cb
ja 0x100222bb
cmp edx, dword [edi + 0x284]
jb 0x100222cb
push ecx
push edx
push ecx
push edx
lea ecx, [edi + 0x294]
push ecx
call esi
add esp, 0x14
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x2d95]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.1009bea4
mov esp, ebp
pop ebp
ret 0xc