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

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
xor edx, edx
push ebp
push 0x415b28
push dword fs:[edx]
mov dword fs:[edx], esp
xor ebx, ebx
test eax, eax
je 0x415937
cmp dword [eax + 0xa8], 0
jne 0x415adb
lea eax, [ebp - 0x14]
push eax
push 1
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x48]
mov ecx, 0x7fffffff
mov eax, 0x415b40
call fcn.004083b8
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x48]
mov ecx, 0x7fffffff
call fcn.00404b98
mov edx, 0x415b4c
mov eax, dword [ebp - 0x14]
call fcn.00408364
test al, al
jne 0x4159e2
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x48]
call fcn.00404940
push eax
mov eax, dword [ebp - 0x14]
call fcn.00404940
pop ecx
sub ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x48]
mov edx, 1
call fcn.00404b98
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x10]
mov ecx, 0x415b4c
call fcn.0040498c
mov eax, dword [ebp - 0x10]
call fcn.00404b38
push eax
call fcn.00406fbc
cmp eax, 0xffffffff
jne 0x4159f3
lea eax, [ebp - 0x10]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x48]
call fcn.00404720
jmp 0x4159f3
lea eax, [ebp - 0x10]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x48]
call fcn.00404720
mov eax, dword [ebp - 0x10]
call fcn.00404b38
mov esi, eax
push esi
call fcn.00406fbc
cmp eax, 0xffffffff
je 0x415aff
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push esi
call fcn.00406e6c
mov esi, eax
cmp esi, 0xffffffff
je 0x415aff
push 0
push 0
push 0
push 2
push 0
push esi
call fcn.00406e74
mov edi, eax
test edi, edi
je 0x415ad3
push 0
push 0
push 0
push 4
push edi
call fcn.00407154
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x415acd
mov eax, dword [ebp - 0xc]
call fcn.0040a940
test eax, eax
je 0x415ab8
mov edx, eax
add edx, 0xf8
mov dword [ebp - 8], edx
movzx edx, word [eax + 6]
dec edx
shl edx, 3
lea edx, [edx + edx*4]
add dword [ebp - 8], edx
mov edx, dword [ebp - 8]
cmp dword [edx + 0x14], 0
je 0x415ac4
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0xc]
cmp edx, dword [eax + 0xa8]
jne 0x415ac4
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx + 0x14]
mov eax, dword [ebp - 0xc]
add ecx, eax
mov edx, ecx
push ebp
mov edx, dword [edx + 0x18]
add edx, eax
mov eax, edx
call fcn.004157f4
pop ecx
mov ebx, eax
jmp 0x415ac4
push ebp
mov eax, dword [ebp - 0xc]
call fcn.004157f4
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0xc]
push eax
call fcn.00407214
push edi
call fcn.00406e54
push esi
call fcn.00406e54
jmp 0x415aff
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
mov ecx, dword [ecx + 0x34]
mov esi, ecx
add esi, dword [eax + 0xa8]
mov edx, esi
push ebp
mov eax, dword [ebp + 8]
mov eax, ecx
add eax, dword [edx + 0x14]
call fcn.004157f4
pop ecx
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x415b2f
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.004046ac
lea eax, [ebp - 4]
mov edx, dword [0x4151b8]
call fcn.00405ed4
ret