Function at 0x4205fc
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 0x420605
push ecx
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 0x42097e
push dword fs:[edx]
mov dword fs:[edx], esp
xor ebx, ebx
test eax, eax
jne 0x420637
xor eax, eax
jmp 0x420650
cmp word [eax + 0x18], 0x20b
jne 0x42064a
add eax, 0x18
mov eax, dword [eax + 0xa0]
jmp 0x420650
mov eax, dword [eax + 0xa8]
test eax, eax
jne 0x420928
lea eax, [ebp - 0x20]
push eax
push 1
mov esi, dword [0x533280]
mov esi, dword [esi]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x4c]
mov ecx, 0x7fffffff
mov eax, 0x420994
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.004052a4
mov esi, dword [0x532fc8]
mov esi, dword [esi]
mov edx, 0x42099c
mov eax, dword [ebp - 0x20]
call esi
test al, al
jne 0x420747
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
call fcn.00405108
push eax
mov eax, dword [ebp - 0x20]
call fcn.00405108
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.004052a4
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
mov ecx, 0x42099c
call fcn.00405174
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x42070a
mov eax, dword [ebp - 0x1c]
call fcn.004050f8
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x420734
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
je 0x420758
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x1c]
call fcn.00404a20
mov eax, dword [ebp - 0x28]
call fcn.00404c58
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x420758
lea eax, [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call fcn.00404fa4
jmp 0x420758
lea eax, [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call fcn.00404fa4
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x420777
mov eax, dword [ebp - 0x1c]
call fcn.004050f8
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
jne 0x4207a9
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
je 0x420948
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
call fcn.00404a20
mov eax, dword [ebp - 0x2c]
call fcn.00404c58
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x420948
mov eax, dword [ebp - 0x1c]
call fcn.00420464
test al, al
jne 0x420948
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x4207e6
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0x1c]
call fcn.004050f8
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
jmp 0x420810
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x1c]
call fcn.00404a20
mov eax, dword [ebp - 0x30]
call fcn.00404c58
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
cmp esi, 0xffffffff
je 0x420948
push 0
push 0
push 0
push 2
push 0
push esi
call sub.kernel32.dll_CreateFileMappingA
mov edi, eax
test edi, edi
je 0x420920
push 0
push 0
push 0
push 4
push edi
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x42091a
mov eax, dword [ebp - 0x18]
call fcn.0040f9f0
test eax, eax
je 0x420905
cmp word [eax + 0x18], 0x20b
jne 0x420873
mov edx, eax
add edx, 0x108
mov dword [ebp - 0x14], edx
jmp 0x42087e
mov edx, eax
add edx, 0xf8
mov dword [ebp - 0x14], edx
add dword [ebp - 0x14], 0x28
mov edx, dword [ebp - 0x14]
test byte [edx + 0x24], 0x20
je 0x4208aa
mov dword [ebp - 8], 3
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
mov dword [ebp - 0xc], edx
sub dword [ebp - 0x14], 0x28
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
sub dword [ebp - 0xc], edx
jmp 0x4208ae
sub dword [ebp - 0x14], 0x28
movzx edx, word [eax + 6]
dec edx
shl edx, 3
lea edx, [edx + edx*4]
add dword [ebp - 0x14], edx
cmp word [eax + 0x18], 0x20b
jne 0x4208cf
add eax, 0x18
mov eax, dword [eax + 0xa0]
jmp 0x4208d5
mov eax, dword [eax + 0xa8]
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x14], 0
je 0x420911
mov edx, dword [ebp - 0x14]
cmp eax, dword [edx + 0xc]
jne 0x420911
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x14]
mov eax, dword [ebp - 0x18]
add ecx, eax
mov edx, ecx
push ebp
mov edx, dword [edx + 0x18]
add edx, eax
mov eax, edx
call fcn.00420270
pop ecx
mov ebx, eax
jmp 0x420911
push ebp
mov eax, dword [ebp - 0x18]
call fcn.00420270
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push edi
call sub.kernel32.dll_CloseHandle_1
push esi
call sub.kernel32.dll_CloseHandle_1
jmp 0x420948
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx - 4]
mov ecx, dword [ecx + 0x38]
mov esi, ecx
add esi, eax
mov edx, esi
push ebp
mov eax, dword [ebp + 0xc]
mov eax, ecx
add eax, dword [edx + 0x14]
call fcn.00420270
pop ecx
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x420985
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.004047ac
lea eax, [ebp - 0x24]
mov edx, 3
call fcn.00404f5c
lea eax, [ebp - 4]
mov edx, dword [0x41fb9c]
call fcn.004061b8
ret