Function at 0x1000a7e5
Capabilities:
Read file on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe8c
push esi
push edi
push ebx
cmp dword [0x1005250d], 0
je 0x1000a80f
push dword [0x1005250d]
call fcn.10051176
mov dword [0x1005250d], 0
mov eax, dword [0x1005d817]
mov eax, dword [eax]
or eax, eax
je 0x1000ab82
mov eax, dword [eax]
or eax, eax
je 0x1000ab82
mov esi, dword [eax + 0x2ae90]
or esi, esi
je 0x1000ab82
movzx ecx, byte [esi - 4]
lea edi, [ebp - 0x172]
cld
rep movsb byte es:[edi], byte [esi]
mov byte [edi], 0
push 0x104
lea eax, [ebp - 0x140]
push eax
push 0
call fcn.10051008
lea eax, [ebp - 0x140]
push eax
call fcn.1002fd2a
jmp 0x1000a86c
push 0x1000a867
lea eax, [ebp - 0x140]
push eax
call fcn.100510f8
lea eax, [ebp - 0x172]
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.100510f8
jmp 0x1000a897
push 0x1000a892
lea eax, [ebp - 0x140]
push eax
call fcn.100510f8
mov dword [ebp - 0xc], 0
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x140]
push eax
call fcn.10050fc0
cmp eax, 0xffffffff
je 0x1000a9c4
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 4]
call fcn.1005109e
push 0
push 0
push 0
push 8
push 0
push dword [ebp - 4]
call fcn.10050fc6
or eax, eax
je 0x1000a9bc
mov dword [ebp - 0x24], eax
push 0
push 0
push 0
push 4
push dword [ebp - 0x24]
call fcn.10051074
or eax, eax
je 0x1000a9b4
mov dword [ebp - 0x20], eax
mov esi, dword [ebp - 0x20]
add esi, 0x34
xor edx, edx
cmp dx, word [ebp - 0x1a]
jge 0x1000a9ac
movzx eax, word [ebp - 0x1c]
cmp eax, 0
jle 0x1000a9ac
movzx edx, word [ebp - 0x1a]
imul eax, edx
lea eax, [eax + 0x400]
push eax
push pe_nt_image_headers32
call fcn.1003d03c
or eax, eax
je 0x1000a9ac
mov dword [ebp - 0xc], eax
mov edi, dword [ebp - 0xc]
xor edx, edx
movzx eax, word [ebp - 0x1a]
cmp eax, 0
jle 0x1000a99d
xor ecx, ecx
imul eax, edx
add eax, ecx
lea eax, [eax + eax*2]
lea eax, [esi + eax*4]
movzx ebx, word [eax + 4]
movzx eax, word [eax]
and eax, 0x8000
and ebx, 0x8000
add ebx, eax
setne al
dec al
and eax, 0xff
mov byte [edi + ecx], al
movzx eax, word [ebp - 0x1a]
inc ecx
cmp ecx, eax
jb 0x1000a968
movzx ecx, word [ebp - 0x1c]
inc edx
movzx eax, word [ebp - 0x1a]
add edi, eax
cmp edx, ecx
jb 0x1000a95d
push dword [ebp - 0x20]
call fcn.100510d4
push dword [ebp - 0x24]
call fcn.10050fb4
push dword [ebp - 4]
call fcn.10050fb4
cmp dword [ebp - 0xc], 0
je 0x1000ab82
movzx esi, word [ebp - 0x1c]
movzx edi, word [ebp - 0x1a]
mov eax, esi
and eax, 0xf
or eax, eax
je 0x1000a9e9
mov eax, esi
and eax, 0xfffffff0
add eax, 0x10
jmp 0x1000a9eb
mov eax, esi
imul eax, edi
lea eax, [eax + 0x400]
push eax
push pe_nt_image_headers32
call fcn.1003d03c
or eax, eax
je 0x1000ab5e
mov dword [ebp - 0x10], eax
cmp esi, 0
jle 0x1000ab55
cmp edi, 0
jle 0x1000ab55
xor ecx, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
xor eax, eax
mov edx, dword [ebp - 0xc]
add edx, ecx
movzx ebx, word [ebp - 0x1c]
cmp eax, ebx
jae 0x1000aa50
movzx ebx, word [ebp - 0x1a]
cmp ecx, ebx
jae 0x1000aa4c
mov bl, byte [edx]
xor cl, cl
cmp cl, bl
sbb ecx, ecx
neg ecx
jmp 0x1000aa52
xor ecx, ecx
jmp 0x1000aa52
xor ecx, ecx
mov ebx, dword [ebp - 0x10]
test ecx, ecx
sete cl
dec cl
add ebx, dword [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x1a]
add edx, eax
pop eax
and ecx, 0xff
mov byte [ebx + eax], cl
mov ecx, dword [ebp - 0x18]
inc eax
cmp eax, esi
jb 0x1000aa30
movzx ebx, word [ebp - 0x1a]
inc ecx
mov dword [ebp - 0x18], ecx
mov eax, esi
and eax, 0xf
or eax, eax
jne 0x1000aa8e
add dword [ebp - 0x14], esi
jmp 0x1000aa99
mov eax, esi
and eax, 0xfffffff0
add eax, 0x10
add dword [ebp - 0x14], eax
cmp ecx, ebx
jb 0x1000aa29
movzx eax, word [ebp - 0x1c]
and eax, 0xf
or eax, eax
je 0x1000ab06
movzx eax, word [ebp - 0x1c]
and eax, 0xfffffff0
add eax, 0x10
movzx edx, word [ebp - 0x1a]
push edx
push eax
push dword [ebp - 0x10]
call fcn.1000a1a5
movzx eax, word [ebp - 0x1c]
and eax, 0xfffffff0
add eax, 0x10
movzx edx, word [ebp - 0x1a]
push edx
push eax
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.1000ab89
mov dword [0x1005250d], eax
lea eax, [ebp - 0x3c]
push eax
push 0x18
push dword [0x1005250d]
call fcn.1005118e
mov ax, word [ebp - 0x1c]
mov word [0x1006baa3], ax
mov eax, dword [ebp - 0x34]
mov word [0x1006baa5], ax
jmp 0x1000ab55
movzx eax, word [ebp - 0x1c]
movzx edx, word [ebp - 0x1a]
push edx
push eax
push dword [ebp - 0x10]
call fcn.1000a1a5
movzx eax, word [ebp - 0x1c]
movzx edx, word [ebp - 0x1a]
push edx
push eax
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.1000ab89
mov dword [0x1005250d], eax
lea eax, [ebp - 0x3c]
push eax
push 0x18
push dword [0x1005250d]
call fcn.1005118e
mov eax, dword [ebp - 0x38]
mov word [0x1006baa3], ax
mov eax, dword [ebp - 0x34]
mov word [0x1006baa5], ax
lea eax, [ebp - 0x10]
push eax
call fcn.1003d00f
lea eax, [ebp - 0xc]
push eax
call fcn.1003d00f
mov byte [0x10052432], 1
push 1
push 0
push dword [ebp + 8]
call fcn.10050efa
push dword [ebp + 8]
call fcn.10050fae
pop ebx
pop edi
pop esi
leave
ret 4