Function at 0x4c7a4e00
Capabilities:
Read file via mapping

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0xc]
push esi
push edi
push 0x206
lea ecx, [ebp - 0x216]
sub eax, 1
push 0
push ecx
mov byte [ebp - 1], 0
mov dword [ebp - 8], eax
mov word [ebp - 0x218], 0
call sub.msvcrt.dll_memset
add esp, 0xc
test byte [ebx + 8], 0x40
je 0x4c7a501e
cmp dword [ebp + 0xc], 1
jne 0x4c7a4e5e
mov edx, dword [ebx + 0x3cdc]
mov eax, dword [ebx + 0x3ad0]
mov dword [ebp + 8], edx
jmp 0x4c7a4e6d
mov ecx, dword [ebx + 0x3eec]
mov eax, dword [ebx + 0x3ce0]
mov dword [ebp + 8], ecx
test eax, eax
je 0x4c7a4ed0
push 0
push 0
push 0
push 2
push 0
push eax
call fcn.4c7a3b00
mov esi, eax
test esi, esi
mov dword [ebp - 0x10], esi
je 0x4c7a4ed0
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x4c7a4ea7
lea edi, [eax + 0x10]
test edi, edi
mov dword [ebp - 0xc], edi
jne 0x4c7a4edb
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4c7a4ed0
push 0x85d
push 0x4c782860
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, edi
lea ecx, [ecx]
mov edx, dword [ebp + 0xc]
push edx
push 1
lea eax, [ebp - 1]
push eax
push ebx
mov byte [ebp - 1], 3
call fcn.4c7a4c10
test eax, eax
je 0x4c7a4ed0
cmp byte [esi], 2
jne 0x4c7a4f00
add esi, 1
cmp byte [esi], 1
jne 0x4c7a4f08
add esi, 1
push 0x4c78285c
push esi
lea ecx, [ebp - 0x218]
push ecx
call fcn.4c7a3750
test eax, eax
jne 0x4c7a4f3c
push 0x874
push 0x4c782860
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [ebp - 0x218]
push edx
push ebx
call fcn.4c7a4c10
test eax, eax
je 0x4c7a4ed0
mov eax, dword [ebp + 8]
add edi, eax
lea esp, [esp]
add esi, 1
cmp esi, edi
ja 0x4c7a4ed0
cmp byte [esi], 0xff
jne 0x4c7a4f70
mov ecx, dword [ebp + 0xc]
push ecx
push 1
lea edx, [ebp - 1]
push edx
push ebx
mov byte [ebp - 1], 0xff
call fcn.4c7a4c10
test eax, eax
je 0x4c7a4ed0
add esi, 1
cmp esi, edi
jae 0x4c7a4fab
mov edi, dword [ebp - 0xc]
jmp 0x4c7a4ee0
mov eax, dword [ebp - 0xc]
push eax
call fcn.4c7a3ba0
test eax, eax
jne 0x4c7a4fd6
push 0x88e
push 0x4c782860
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4c7a5002
push 0x894
push 0x4c782860
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
mov eax, dword [ebx + 0xc]
cmp eax, 2
jne 0x4c7a5018
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
add eax, 0xfffffffe
mov dword [ebp - 8], eax
mov esi, dword [ebp + 0xc]
push esi
push 1
lea edx, [ebp - 1]
push edx
push ebx
mov byte [ebp - 1], 5
call fcn.4c7a4c10
test eax, eax
je 0x4c7a4ed0
push esi
push 4
lea eax, [ebp - 8]
push eax
push ebx
call fcn.4c7a4c10
test eax, eax
je 0x4c7a4ed0
push esi
push 1
lea ecx, [ebp - 1]
push ecx
push ebx
mov byte [ebp - 1], 0xff
call fcn.4c7a4c10
neg eax
pop edi
sbb eax, eax
pop esi
neg eax
pop ebx
mov esp, ebp
pop ebp
ret 8