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

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push esi
push edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x422f5f
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
test ecx, ecx
je 0x422d07
cmp dword [ecx + 0xa8], 0
jne 0x422ef8
lea eax, [ebp - 0x14]
push eax
push 1
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x4c]
mov ecx, 0x7fffffff
mov eax, 0x422f7c
call fcn.0040c45c
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
mov ecx, 0x7fffffff
call fcn.00405f64
mov edx, 0x422f8c
mov eax, dword [ebp - 0x14]
call fcn.0040c114
test al, al
jne 0x422dbb
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
xor edx, edx
call fcn.00405a38
call fcn.00405bbc
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
call fcn.00405bbc
mov ecx, eax
pop eax
sub ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
mov edx, 1
call fcn.00405f64
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x10]
mov ecx, 0x422f8c
call fcn.00405c6c
mov eax, dword [ebp - 0x10]
call fcn.00405ee4
push eax
call fcn.00409604
cmp eax, 0xffffffff
jne 0x422dcc
lea eax, [ebp - 0x10]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call fcn.004058d8
jmp 0x422dcc
lea eax, [ebp - 0x10]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call fcn.004058d8
mov eax, dword [ebp - 0x10]
call fcn.00405ee4
mov esi, eax
push esi
call fcn.00409604
cmp eax, 0xffffffff
je 0x422f2e
mov eax, dword [ebp - 0x10]
call fcn.00422b14
test al, al
jne 0x422f2e
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push esi
call fcn.004093e4
mov esi, eax
cmp esi, 0xffffffff
je 0x422f2e
push 0
push 0
push 0
push 2
push 0
push esi
call fcn.004093f4
mov edi, eax
test edi, edi
je 0x422ef0
push 0
push 0
push 0
push 4
push edi
call fcn.00409868
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x422eea
mov eax, dword [ebp - 0x18]
call fcn.004171bc
mov ecx, eax
test ecx, ecx
je 0x422ec7
mov edx, ecx
add edx, 0xf8
mov eax, edx
add eax, 0x28
test byte [eax + 0x24], 0x20
je 0x422e83
mov dword [ebp - 8], 3
mov edx, dword [eax + 0xc]
mov dword [ebp - 0xc], edx
sub eax, 0x28
mov edx, dword [eax + 0xc]
sub dword [ebp - 0xc], edx
jmp 0x422e86
sub eax, 0x28
movzx edx, word [ecx + 6]
dec edx
add edx, edx
add edx, edx
add edx, edx
lea edx, [edx + edx*4]
add eax, edx
cmp dword [ebp - 8], 2
jne 0x422ee1
cmp dword [eax + 0x14], 0
je 0x422ee1
mov edx, dword [eax + 0xc]
cmp edx, dword [ecx + 0xa8]
jne 0x422ee1
mov eax, dword [eax + 0x14]
mov edx, dword [ebp - 0x18]
add eax, edx
mov ebx, eax
push ebp
mov eax, dword [ebx + 0x18]
add eax, edx
call fcn.0042298c
pop ecx
mov ebx, eax
jmp 0x422ee1
cmp dword [ebp - 8], 2
jne 0x422edb
push ebp
mov eax, dword [ebp - 0x18]
call fcn.0042298c
pop ecx
test al, al
jne 0x422edf
xor ebx, ebx
jmp 0x422ee1
mov bl, 1
mov eax, dword [ebp - 0x18]
push eax
call fcn.00409978
push edi
call fcn.004093a4
push esi
call fcn.004093a4
jmp 0x422f2e
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x38]
add eax, dword [ecx + 0xa8]
mov ebx, eax
cmp dword [ebp - 8], 2
jne 0x422f26
push ebp
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x38]
add eax, dword [ebx + 0x14]
call fcn.0042298c
pop ecx
test al, al
jne 0x422f2a
xor eax, eax
jmp 0x422f2c
mov al, 1
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x422f66
lea eax, [ebp - 0x1c]
call fcn.00405828
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.0040584c
lea eax, [ebp - 4]
mov edx, dword [0x41fa4c]
call fcn.00407f38
ret