Function at 0x10afd60
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x10de03c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x40], eax
mov eax, dword [eax + 4]
mov ax, word [eax + 0x540]
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebx + 0x44]
push esi
mov esi, ecx
mov word [ebp - 0x38], 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 - 0x44]
mov word [eax], 1
mov esi, dword [ebx + 0x38]
mov eax, dword [ebp + 0x10]
xor edx, edx
cmp word [ebp + 0x20], dx
mov dword [esi], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x34], 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 0x10afde6
mov word [esi + 6], 1
push 0xa
push esi
call fcn.010af2d5
mov word [esi + 0x14], ax
mov dword [ebx + 0x50], 0x16
xor eax, eax
cmp word [ebp - 0x3c], ax
je 0x10afe43
push dword [ebp - 0x30]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x3c], 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 - 0x30]
add esp, 0x10
test byte [eax + 0xc], 0x20
je 0x10afe3b
mov edi, dword [ebp + 0x14]
cmp edi, esi
mov dword [ebp - 0x34], 1
jb 0x10afe3b
mov edi, esi
sub dword [ebp + 0x14], edi
add edi, 0x16
jmp 0x10afe88
cmp word [ebp - 0x34], ax
jne 0x10afe7a
mov esi, dword [ebp - 0x30]
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 0x10afe85
mov edi, dword [ebp + 0xc]
cmp dword [ebp + 0x14], edi
mov dword [ebp - 0x34], 1
jae 0x10afe85
mov edi, dword [ebp + 0x14]
jmp 0x10afe85
mov edi, dword [ebp + 0x14]
cmp edi, dword [ebp + 0xc]
jb 0x10afe85
mov edi, dword [ebp + 0xc]
sub dword [ebp + 0x14], edi
xor esi, esi
cmp word [ebp - 0x34], si
jne 0x10afedf
mov eax, dword [ebp - 0x30]
test byte [eax + 0xc], 0x10
je 0x10afedf
cmp word [ebp + 0x18], si
je 0x10aff59
mov eax, dword [ebp + 0x14]
cmp eax, 0x10000
mov dword [ebp - 0x48], eax
jb 0x10afed9
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 0x10afecd
mov dword [ebx + 0x48], eax
jmp 0x10afed0
mov dword [ebx + 0x48], ecx
push ebx
push dword [ebp - 0x40]
call fcn.010afb63
add edi, dword [ebp + 0x14]
mov dword [ebp + 0x14], esi
push edi
push dword [ebx + 0x38]
push dword [ebp - 0x38]
call fcn.010970c4
test ax, ax
je 0x10aff07
mov ax, 0xfdff
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.01075aef
leave
ret 0x20
call fcn.01075a13
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x38]
call fcn.0109766f
cmp ax, 1
je 0x10aff02
cmp word [ebp - 0x20], si
je 0x10aff26
cmp word [ebp - 0x20], 2
jne 0x10aff75
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 - 0x20], 2
je 0x10aff7e
cmp dword [ebp + 0x14], esi
jne 0x10afdf9
mov eax, dword [ebp - 0x34]
neg ax
sbb eax, eax
and ax, 0xfde7
jmp 0x10afef4
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebx + 0x40]
sub ecx, edi
cmp ecx, eax
mov dword [ebx + 0x50], edi
jb 0x10aff70
mov dword [ebx + 0x48], eax
xor ax, ax
jmp 0x10afef4
mov dword [ebx + 0x48], ecx
jmp 0x10aff6b
mov ax, 0xfdf8
jmp 0x10afef4
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 4]
or word [eax + 0x528], 0x204
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x24], eax
jne 0x10aff9e
mov ecx, dword [ebp - 0x30]
test byte [ecx + 0xc], 0x10
jne 0x10affa4
mov ecx, dword [ebp - 0x44]
mov word [ecx], si
cmp dword [ebp + 0x10], 0x44444654
jne 0x10aff6b
cmp dword [ebp - 0x24], eax
je 0x10aff6b
sub eax, dword [ebp - 0x24]
push 1
sub eax, dword [ebp - 0x48]
neg eax
push eax
push dword [ebp - 0x30]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10aff6b
mov ax, 0xfde7
jmp 0x10afef4