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

Disassembly:
push 0x44
mov eax, 0x1002621b
call fcn.1002480d
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0x30], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov eax, dword [ebp + 0x28]
mov byte [ebp - 4], 1
mov esi, dword [eax]
jmp 0x100221cf
push esi
lea ecx, [ebp - 0x2c]
call fcn.100111fa
mov byte [ebp - 4], 2
cmp dword [ebp - 0x18], 0x10
mov ecx, dword [ebp - 0x2c]
mov eax, ecx
jae 0x10022137
lea eax, [ebp - 0x2c]
mov edi, dword [ebp - 0x1c]
cmp byte [eax + edi - 1], 0x5c
je 0x1002217b
cmp dword [ebp + 0x24], 0x10
mov eax, dword [ebp + 0x10]
mov edx, eax
jae 0x1002214f
lea edx, [ebp + 0x10]
cmp byte [edx], 0x5c
je 0x1002217b
cmp dword [ebp - 0x18], 0x10
jae 0x1002215d
lea ecx, [ebp - 0x2c]
cmp byte [ecx + edi - 1], 0x2f
je 0x1002217b
cmp dword [ebp + 0x24], 0x10
jae 0x1002216d
lea eax, [ebp + 0x10]
cmp byte [eax], 0x2f
je 0x1002217b
push ecx
lea ecx, [ebp - 0x2c]
call fcn.100227f4
push ecx
push ecx
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp - 0x2c]
call fcn.10022cce
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x10022195
lea eax, [ebp - 0x2c]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
mov edi, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], edi
push 1
call fcn.100049cb
cmp edi, 0xffffffff
jne 0x10022257
mov eax, dword [ebp + 0x28]
add esi, 0x18
cmp esi, dword [eax + 4]
jne 0x1002211c
cmp dword [ebp + 0x24], 0x10
mov eax, dword [ebp + 0x10]
jae 0x100221e4
lea eax, [ebp + 0x10]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x38], eax
cmp edi, 0xffffffff
jne 0x10022257
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1002221a
movzx esi, si
or esi, 0x80070000
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002241d
test byte [eax + 0x1c], 1
je 0x1002241d
cmp byte [eax + 0x19], 2
jb 0x1002241d
push esi
push dword [eax + 0x14]
mov edx, 0x10003878
push dword [eax + 0x10]
push 0x16
pop ecx
call fcn.10004db8
jmp 0x1002241d
mov eax, dword [section..data]
cmp eax, section..data
je 0x10022282
test byte [eax + 0x1c], 1
je 0x10022282
cmp byte [eax + 0x19], 5
jb 0x10022282
push dword [eax + 0x14]
mov edx, 0x10003878
push dword [eax + 0x10]
push 0x17
pop ecx
call fcn.10004d9a
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x100222e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100222a6
movzx esi, si
or esi, 0x80070000
mov eax, dword [section..data]
cmp eax, section..data
je 0x10022411
test byte [eax + 0x1c], 1
je 0x10022411
cmp byte [eax + 0x19], 2
jb 0x10022411
push esi
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x18
mov edx, 0x10003878
pop ecx
call fcn.10004db8
jmp 0x10022411
mov eax, dword [ebp - 0x4c]
lea esi, [eax + 1]
mov dword [ebp - 0x34], esi
cmp esi, eax
jb 0x100222f4
mov esi, ebx
jmp 0x10022329
or dword [ebp - 0x34], 0xffffffff
mov esi, 0x80070216
mov eax, dword [section..data]
cmp eax, section..data
je 0x10022329
test byte [eax + 0x1c], 1
je 0x10022329
cmp byte [eax + 0x19], 2
jb 0x10022329
push esi
push dword [eax + 0x14]
mov edx, 0x10003878
push dword [eax + 0x10]
push 0x19
pop ecx
call fcn.10004db8
push dword [ebp - 0x34]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 3
call fcn.1000af96
push ebx
push ebx
mov dword [ebp - 4], 1
push dword [ebp - 0x4c]
push dword [ebp - 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10022399
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10022367
movzx esi, si
or esi, 0x80070000
mov eax, dword [section..data]
cmp eax, section..data
je 0x10022411
test byte [eax + 0x1c], 1
je 0x10022411
cmp byte [eax + 0x19], 2
jb 0x10022411
push esi
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x1b
jmp 0x100222d3
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
push ecx
mov byte [ecx + eax], bl
call fcn.100047b0
pop ecx
mov ecx, dword [ebp - 0x50]
push eax
push dword [ebp - 0x44]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1002284c
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
sub eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x30]
sbb ecx, ebx
add dword [edx], eax
adc dword [edx + 4], ecx
jmp 0x10022411
cmp edi, 0xffffffff
je 0x1002241d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x44]
call fcn.10007fb7
push ebx
push 1
lea ecx, [ebp + 0x10]
call fcn.100049cb
mov eax, esi
call fcn.1002475f
ret 0x2c