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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x422d09
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
test ecx, ecx
je 0x422aca
cmp dword [ecx + 0xa8], 0
jne 0x422cb4
lea eax, [ebp - 0x18]
push eax
push 1
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x4c]
mov ecx, 0x7fffffff
mov eax, 0x422d28
call fcn.0040e300
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
mov ecx, 0x7fffffff
call fcn.004076d4
mov edx, 0x422d38
mov eax, dword [ebp - 0x18]
call fcn.0040e1ac
test al, al
jne 0x422b75
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
call fcn.004072a0
push eax
mov eax, dword [ebp - 0x18]
call fcn.004072a0
pop ecx
sub ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
mov edx, 1
call fcn.004076d4
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x14]
mov ecx, 0x422d38
call fcn.00407530
mov eax, dword [ebp - 0x14]
call fcn.004076c4
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x422b86
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call fcn.00407268
jmp 0x422b86
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call fcn.00407268
mov eax, dword [ebp - 0x14]
call fcn.004076c4
mov esi, eax
push esi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x422cd8
mov eax, dword [ebp - 0x14]
call fcn.004228dc
test al, al
jne 0x422cd8
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push esi
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x422cd8
push 0
push 0
push 0
push 2
push 0
push esi
call sub.kernel32.dll_CreateFileMappingW
mov edi, eax
test edi, edi
je 0x422cac
push 0
push 0
push 0
push 4
push edi
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x422ca6
mov eax, dword [ebp - 0x20]
call fcn.00411888
mov ecx, eax
test ecx, ecx
je 0x422c91
mov eax, ecx
add eax, 0xf8
mov dword [ebp - 0x1c], eax
add dword [ebp - 0x1c], 0x28
mov eax, dword [ebp - 0x1c]
test byte [eax + 0x24], 0x20
je 0x422c48
mov dword [ebp - 8], 3
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xc], eax
sub dword [ebp - 0x1c], 0x28
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xc]
sub dword [ebp - 0xc], eax
jmp 0x422c4c
sub dword [ebp - 0x1c], 0x28
movzx eax, word [ecx + 6]
dec eax
add eax, eax
add eax, eax
add eax, eax
lea eax, [eax + eax*4]
add dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x14], 0
je 0x422c9d
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xc]
cmp eax, dword [ecx + 0xa8]
jne 0x422c9d
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ecx + 0x14]
mov edx, dword [ebp - 0x20]
add ecx, edx
mov eax, ecx
push ebp
mov eax, dword [eax + 0x18]
add eax, edx
call fcn.00422740
pop ecx
mov ebx, eax
jmp 0x422c9d
push ebp
mov eax, dword [ebp - 0x20]
call fcn.00422740
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push edi
call sub.kernel32.dll_CloseHandle_1
push esi
call sub.kernel32.dll_CloseHandle_1
jmp 0x422cd8
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x38]
mov ebx, edx
add ebx, dword [ecx + 0xa8]
mov eax, ebx
push ebp
mov ecx, dword [ebp + 8]
add edx, dword [eax + 0x14]
mov eax, edx
call fcn.00422740
pop ecx
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x422d10
lea eax, [ebp - 0x24]
call fcn.00406de8
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00406e54
lea eax, [ebp - 4]
mov edx, dword [0x41f8c8]
call fcn.00408d3c
ret