Function at 0x4a529114
Capabilities:
Check if file exists
Enumerate pe sections
Get file attributes
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 5
push 0
push 0
dec ecx
jne 0x4a52911d
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov byte [ebp - 0xe], al
mov eax, dword [ebp + 8]
xor edx, edx
push ebp
push 0x4a529488
push dword fs:[edx]
mov dword fs:[edx], esp
xor ebx, ebx
test eax, eax
jne 0x4a52914e
xor eax, eax
jmp 0x4a529167
cmp word [eax + 0x18], 0x20b
jne 0x4a529161
add eax, 0x18
mov eax, dword [eax + 0xa0]
jmp 0x4a529167
mov eax, dword [eax + 0xa8]
test eax, eax
jne 0x4a529431
lea eax, [ebp - 0x18]
push eax
push 1
mov esi, dword [0x4a5ed494]
mov esi, dword [esi]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x4c]
mov ecx, 0x7fffffff
mov eax, 0x4a5294a8
call esi
mov edx, eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
mov ecx, 0x7fffffff
call fcn.4a508658
mov esi, dword [0x4a5ed39c]
mov esi, dword [esi]
mov edx, 0x4a5294b8
mov eax, dword [ebp - 0x18]
call esi
test al, al
jne 0x4a529263
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
call fcn.4a507ae8
push eax
mov eax, dword [ebp - 0x18]
call fcn.4a507ae8
pop ecx
sub ecx, eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
mov edx, 1
call fcn.4a508658
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x14]
mov ecx, 0x4a5294b8
call fcn.4a5084e8
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x4a529221
mov eax, dword [ebp - 0x14]
call fcn.4a5082f8
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x4a529250
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
je 0x4a529274
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call fcn.4a508124
mov eax, dword [ebp - 0x24]
call fcn.4a507f78
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x4a529274
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call fcn.4a507a20
jmp 0x4a529274
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call fcn.4a507a20
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x4a529293
mov eax, dword [ebp - 0x14]
call fcn.4a5082f8
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
jne 0x4a5292ca
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
je 0x4a52944a
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call fcn.4a508124
mov eax, dword [ebp - 0x28]
call fcn.4a507f78
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x4a52944a
mov eax, dword [ebp - 0x14]
call fcn.4a528f64
test al, al
jne 0x4a52944a
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x4a529307
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0x14]
call fcn.4a5082f8
push eax
call sub.kernel32.dll_CreateFileW_1
mov esi, eax
jmp 0x4a529336
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call fcn.4a508124
mov eax, dword [ebp - 0x2c]
call fcn.4a507f78
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x4a52944a
push 0
push 0
push 0
push 2
push 0
push esi
call sub.kernel32.dll_CreateFileMappingW
mov edi, eax
test edi, edi
je 0x4a529429
push 0
push 0
push 0
push 4
push edi
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4a529423
mov eax, dword [ebp - 0x1c]
call fcn.4a5169c4
test eax, eax
je 0x4a52940e
cmp word [eax + 0x18], 0x20b
jne 0x4a529396
mov edx, eax
add edx, 0x108
jmp 0x4a52939e
mov edx, eax
add edx, 0xf8
add edx, 0x28
test byte [edx + 0x24], 0x20
je 0x4a5293bf
mov dword [ebp - 8], 3
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0xc], ecx
sub edx, 0x28
mov ecx, dword [edx + 0xc]
sub dword [ebp - 0xc], ecx
jmp 0x4a5293c2
sub edx, 0x28
movzx ecx, word [eax + 6]
dec ecx
add ecx, ecx
add ecx, ecx
add ecx, ecx
lea ecx, [ecx + ecx*4]
add edx, ecx
cmp word [eax + 0x18], 0x20b
jne 0x4a5293e5
add eax, 0x18
mov eax, dword [eax + 0xa0]
jmp 0x4a5293eb
mov eax, dword [eax + 0xa8]
cmp dword [edx + 0x14], 0
je 0x4a52941a
cmp eax, dword [edx + 0xc]
jne 0x4a52941a
mov eax, dword [edx + 0x14]
mov ecx, dword [ebp - 0x1c]
add eax, ecx
push ebp
mov eax, dword [eax + 0x18]
add eax, ecx
call fcn.4a528d78
pop ecx
mov ebx, eax
jmp 0x4a52941a
push ebp
mov eax, dword [ebp - 0x1c]
call fcn.4a528d78
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push edi
call sub.kernel32.dll_CloseHandle_1
push esi
call sub.kernel32.dll_CloseHandle_1
jmp 0x4a52944a
mov edx, dword [ebp + 0xc]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x38]
add eax, edx
push ebp
add edx, dword [eax + 0x14]
mov eax, edx
call fcn.4a528d78
pop ecx
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a52948f
lea eax, [ebp - 0x2c]
mov edx, 3
call fcn.4a5076a8
lea eax, [ebp - 0x20]
call fcn.4a507618
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.4a507678
lea eax, [ebp - 4]
mov edx, dword [0x4a525cac]
call fcn.4a50959c
ret