Function at 0x1005de1
Capabilities:
Read file via mapping

Disassembly:
push 0xa58
push 0x1007630
call fcn.010068a8
mov esi, ecx
mov dword [ebp - 0xa68], esi
xor eax, eax
mov byte [ebp - 0xa45], al
mov dword [ebp - 0xa58], eax
mov dword [ebp - 0xa54], eax
mov dword [ebp - 0xa50], eax
xor ecx, ecx
mov word [ebp - 0xa44], cx
push 0xa26
push eax
lea eax, [ebp - 0xa42]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa44]
mov dword [ebp - 0xa4c], eax
mov ebx, esi
call fcn.0100511a
test eax, eax
jge 0x1005e5d
mov dword [esi + 0x20], 1
call fcn.0100511a
mov ebx, eax
test ebx, ebx
jl 0x10060bb
call fcn.01003948
mov ebx, eax
test ebx, ebx
jl 0x10060bb
cmp byte [ebp - 0xa45], 0
jne 0x100608c
mov eax, dword [esi + 4]
test eax, eax
jne 0x1005e89
mov byte [ebp - 0xa45], 1
jmp 0x1005e6c
push eax
push dword [ebp - 0xa54]
push dword [ebp - 0xa50]
push 4
push dword [esi + 0x28]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp - 0xa58], edi
test edi, edi
jne 0x1005ee6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1005ec1
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
cmp dword [esi + 0x20], 2
jne 0x1005e80
mov eax, esi
call fcn.0100526c
mov ebx, eax
test ebx, ebx
jl 0x1005e80
and dword [ebp - 0xa54], 0
and dword [ebp - 0xa50], 0
jmp 0x1005e6c
and dword [ebp - 4], 0
cmp dword [esi], 0
jne 0x1005fa5
mov eax, dword [esi + 4]
add eax, dword [ebp - 0xa58]
cmp edi, eax
jae 0x1005fa5
mov al, byte [edi]
test al, al
je 0x1005f58
cmp al, 0xa
je 0x1005f58
cmp al, 0xd
je 0x1005f58
lea ecx, [ebp - 0x1d]
cmp dword [ebp - 0xa4c], ecx
jae 0x1005f2d
mov ecx, dword [ebp - 0xa4c]
mov byte [ecx], al
inc dword [ebp - 0xa4c]
jmp 0x1005f99
mov eax, dword [ebp - 0xa4c]
mov byte [eax], 0
lea eax, [ebp - 0xa44]
push eax
call fcn.01005599
mov ebx, eax
mov dword [ebp - 0xa5c], ebx
lea eax, [ebp - 0xa44]
mov dword [ebp - 0xa4c], eax
jmp 0x1005eea
lea ecx, [ebp - 0xa44]
mov eax, dword [ebp - 0xa4c]
cmp eax, ecx
jbe 0x1005f99
mov ecx, eax
lea edx, [ebp - 0xa44]
sub ecx, edx
cmp ecx, 0xa28
jae 0x1005f8d
mov byte [eax], 0
mov eax, edx
push eax
call fcn.01005599
mov ebx, eax
mov dword [ebp - 0xa5c], ebx
lea eax, [ebp - 0xa44]
mov dword [ebp - 0xa4c], eax
inc edi
mov dword [ebp - 0xa60], edi
jmp 0x1005eea
mov dword [ebp - 4], 0xfffffffe
cmp dword [esi], 0
jne 0x1005e80
mov edi, dword [esi + 0x30]
mov eax, dword [esi + 4]
cmp edi, eax
jne 0x1006003
add dword [ebp - 0xa54], eax
adc dword [ebp - 0xa50], 0
mov ecx, dword [esi + 0x18]
sub ecx, dword [ebp - 0xa54]
mov eax, dword [esi + 0x1c]
sbb eax, dword [ebp - 0xa50]
xor edx, edx
cmp eax, edx
jg 0x1005e6c
jl 0x1005ff2
cmp ecx, edi
jae 0x1005e6c
mov eax, dword [esi + 0x18]
sub eax, dword [ebp - 0xa54]
mov dword [esi + 4], eax
jmp 0x1005e6c
cmp dword [esi + 0x20], 2
jne 0x1005e80
push dword [ebp - 0xa58]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x1006023
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov dword [ebp - 0xa58], edi
mov eax, esi
call fcn.0100526c
mov ebx, eax
cmp ebx, edi
jl 0x1005e80
mov dword [ebp - 0xa54], edi
mov dword [ebp - 0xa50], edi
jmp 0x1005e6c
cmp dword [ebp - 0xa58], 0
je 0x10060bb
push dword [ebp - 0xa58]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x10060bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10060b9
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
push dword [esi + 0x24]
push dword [esi + 0x28]
call fcn.01003b15
mov eax, ebx
call fcn.010068f0
ret