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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push esi
push edi
push ebx
sub esp, 0x24
xor eax, eax
push eax
push eax
mov edx, dword [str.KERNEL32.dll]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov ebx, eax
push 4
push 0x1000
mov eax, dword [0x10087fa8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
mov ecx, esi
mov edx, dword [0x10087fa8]
call fcn.1000259d
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
movzx edi, word [esi]
xor eax, eax
mov edx, dword [0x10087f80]
test edi, edi
je 0x10002589
inc eax
lea edi, [esi + eax*2]
movzx ecx, word [edi]
test ecx, ecx
jne 0x10002311
movzx edi, word [edi - 2]
cmp edi, 0x5c
je 0x10002336
xor ecx, ecx
mov word [esi + eax*2], cx
dec eax
movzx edi, word [esi + eax*2 - 2]
cmp edi, 0x5c
jne 0x10002327
cmp byte [edx], 0
je 0x1000234d
xor edi, edi
movsx ecx, byte [edi + edx]
inc edi
mov word [esi + eax*2], cx
inc eax
cmp byte [edi + edx], 0
jne 0x1000233d
xor eax, eax
mov edx, 1
push eax
push 0x80
push 3
push eax
push edx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10002578
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, eax
mov eax, dword [0x10087f6c]
push eax
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov ecx, esi
mov edx, dword [0x10087f6c]
call fcn.1000259d
xor eax, eax
lea edx, [esp + 0x1c]
mov dword [edx], eax
push eax
push edx
push dword [esp + 8]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10002578
mov edi, dword [0x10087f70]
mov eax, dword [esp + 0x1c]
add eax, esi
mov dword [esp + 0x18], eax
lea ecx, [esi + edi]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
test eax, eax
jbe 0x10002474
cmp eax, 4
jb 0x10002582
lea edi, [esi + edi + 8]
and edi, 0xf
je 0x1000243e
test edi, 3
jne 0x10002582
neg edi
add edi, 0x10
shr edi, 2
lea esi, [edi + 4]
cmp eax, esi
jb 0x10002582
mov esi, eax
sub esi, edi
and esi, 3
neg esi
add esi, eax
test edi, edi
je 0x10002447
mov dword [esp + 4], 0
mov dword [esp], ebx
mov ebx, dword [esp + 4]
add dword [ecx + ebx*4 + 8], edx
inc ebx
cmp ebx, edi
jb 0x10002430
mov ebx, dword [esp]
jmp 0x10002447
mov esi, eax
and esi, 3
neg esi
add esi, eax
movd xmm0, edx
pshufd xmm0, xmm0, 0
movdqu xmm1, xmmword [ecx + edi*4 + 8]
paddd xmm1, xmm0
movdqu xmmword [ecx + edi*4 + 8], xmm1
add edi, 4
cmp edi, esi
jb 0x10002450
cmp esi, eax
jae 0x10002474
add dword [ecx + esi*4 + 8], edx
inc esi
cmp esi, eax
jb 0x1000246b
mov eax, dword [0x10087f78]
lea edx, [eax + ecx + 1]
push edx
push ebx
lea edi, [ecx + eax]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x10002578
movsx edx, byte [edi]
lea ecx, [edi + edx + 1]
lea eax, [edi + edx]
mov dword [esp + 4], eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x10002578
mov edx, dword [esp + 4]
movsx ecx, byte [edx]
lea edi, [edx + ecx + 1]
lea eax, [edx + ecx]
mov dword [esp], eax
push edi
call esi
mov edx, eax
test edx, edx
je 0x10002578
mov esi, dword [esp]
lea eax, [esp + 0xc]
mov ecx, dword [0x10087f64]
movsx edi, byte [esi]
add esi, edi
add ecx, esi
mov dword [eax + 4], ecx
mov ecx, dword [edx + 0x3c]
mov edi, dword [esi + 4]
mov esi, dword [esi + 8]
mov ecx, dword [ecx + edx + 0x2c]
add ecx, edx
mov dword [eax + 8], ecx
mov dword [eax], 0
push eax
mov edx, dword [0x10087fa0]
push edx
push esi
push ecx
call ebx
push esi
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
call fcn.100025ed
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x10]
push esi
push dword [esp + 0x20]
call ebx
mov eax, dword [0x10087f9c]
xor edx, edx
cmp byte [eax], 0
je 0x10002554
mov eax, dword [esp + 0x18]
mov ecx, dword [0x10087f9c]
movsx ebx, byte [ecx + edx]
mov word [eax + edx*2], bx
inc edx
mov ecx, dword [0x10087f9c]
cmp byte [ecx + edx], 0
jne 0x10002539
mov ecx, dword [esp + 0x18]
lea ebx, [esp]
add edi, dword [ebx + 0x14]
xor eax, eax
mov word [ecx + edx*2], ax
mov edx, dword [ebx + 0x10]
add edx, esi
mov dword [ebx + 4], ecx
mov dword [ebx], edx
mov byte [ebx + 8], 1
push ebx
call edi
add esp, 4
add esp, 0x24
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor esi, esi
jmp 0x10002467
mov edi, esi
jmp 0x1000231c