Function at 0x10a2ad0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov ecx, dword [ebx + 0x44]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov ax, word [eax + 0x540]
push esi
mov esi, ecx
mov word [ebp - 8], ax
xor eax, eax
shr ecx, 2
push edi
mov edi, dword [ebx + 0x38]
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x20]
mov word [eax], 1
mov esi, dword [ebx + 0x38]
mov eax, dword [ebp + 0x14]
xor edx, edx
cmp word [ebp + 0x24], dx
mov dword [esi], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0xc], 1
mov dword [ebp - 4], edx
mov word [esi + 4], dx
mov word [esi + 6], dx
mov word [esi + 0x10], dx
mov word [esi + 0x12], dx
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
je 0x10a2b40
mov word [esi + 6], 1
push 0xa
push esi
call fcn.01091d75
mov word [esi + 0x14], ax
mov dword [ebx + 0x50], 0x16
xor eax, eax
cmp word [ebp - 0xc], ax
je 0x10a2b9d
push dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0x50]
add eax, dword [ebx + 0x38]
add esi, 0xffffffea
push esi
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
mov edi, eax
mov eax, dword [ebp + 0x10]
add esp, 0x10
test byte [eax + 0xc], 0x20
je 0x10a2b95
mov edi, dword [ebp + 0x18]
cmp edi, esi
mov dword [ebp - 4], 1
jb 0x10a2b95
mov edi, esi
sub dword [ebp + 0x18], edi
add edi, 0x16
jmp 0x10a2be2
cmp word [ebp - 4], ax
jne 0x10a2bd4
mov esi, dword [ebp + 0x10]
push esi
push dword [ebp + 0xc]
push 1
push dword [ebx + 0x38]
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test byte [esi + 0xc], 0x20
mov edi, eax
je 0x10a2bdf
mov edi, dword [ebp + 0xc]
cmp dword [ebp + 0x18], edi
mov dword [ebp - 4], 1
jae 0x10a2bdf
mov edi, dword [ebp + 0x18]
jmp 0x10a2bdf
mov edi, dword [ebp + 0x18]
cmp edi, dword [ebp + 0xc]
jb 0x10a2bdf
mov edi, dword [ebp + 0xc]
sub dword [ebp + 0x18], edi
xor esi, esi
cmp word [ebp - 4], si
jne 0x10a2c39
mov eax, dword [ebp + 0x10]
test byte [eax + 0xc], 0x10
je 0x10a2c39
cmp word [ebp + 0x1c], si
je 0x10a2cab
mov eax, dword [ebp + 0x18]
cmp eax, 0x10000
mov dword [ebp + 0x24], eax
jb 0x10a2c33
mov ecx, dword [ebp + 0xc]
mov eax, edi
neg eax
and eax, 3
add edi, eax
mov eax, dword [ebx + 0x40]
sub ecx, edi
cmp ecx, eax
mov dword [ebx + 0x50], edi
jb 0x10a2c27
mov dword [ebx + 0x48], eax
jmp 0x10a2c2a
mov dword [ebx + 0x48], ecx
push ebx
push dword [ebp + 8]
call fcn.010a28f1
add edi, dword [ebp + 0x18]
mov dword [ebp + 0x18], esi
push edi
push dword [ebx + 0x38]
push dword [ebp - 8]
call fcn.0108be2a
test ax, ax
je 0x10a2c59
mov ax, 0xfdff
pop edi
pop esi
leave
ret 0x24
call fcn.0106e781
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 8]
call fcn.0108c332
cmp ax, 1
je 0x10a2c54
cmp word [ebp - 0x28], si
je 0x10a2c78
cmp word [ebp - 0x28], 2
jne 0x10a2cc7
mov ecx, edi
mov edi, dword [ebx + 0x38]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp word [ebp - 0x28], 2
je 0x10a2ccd
cmp dword [ebp + 0x18], esi
jne 0x10a2b53
mov eax, dword [ebp - 4]
neg ax
sbb eax, eax
and ax, 0xfde7
jmp 0x10a2c4e
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebx + 0x40]
sub ecx, edi
cmp ecx, eax
mov dword [ebx + 0x50], edi
jb 0x10a2cc2
mov dword [ebx + 0x48], eax
xor ax, ax
jmp 0x10a2c4e
mov dword [ebx + 0x48], ecx
jmp 0x10a2cbd
mov ax, 0xfdf8
jmp 0x10a2c4e
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
or word [eax + 0x528], 0x204
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x2c], eax
jne 0x10a2ced
mov ecx, dword [ebp + 0x10]
test byte [ecx + 0xc], 0x10
jne 0x10a2cf3
mov ecx, dword [ebp + 0x20]
mov word [ecx], si
cmp dword [ebp + 0x14], 0x44444654
jne 0x10a2cbd
cmp dword [ebp - 0x2c], eax
je 0x10a2cbd
sub eax, dword [ebp - 0x2c]
push 1
sub eax, dword [ebp + 0x24]
neg eax
push eax
push dword [ebp + 0x10]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10a2cbd
mov ax, 0xfde7
jmp 0x10a2c4e