Function at 0x418150
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004039c4
lea eax, [ebp - 0x38]
mov edx, dword [0x415d40]
call fcn.00403d40
xor eax, eax
push ebp
push 0x4184cd
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.004039d4
push eax
call sub.kernel32.dll_CreateFileA_1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x418499
push 0
push 0
push 0
push 2
push 0
push ebx
call sub.kernel32.dll_CreateFileMappingA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x418493
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_MapViewOfFile
mov esi, eax
test esi, esi
je 0x41848a
push 0
push ebx
call sub.kernel32.dll_GetFileSize_1
cmp eax, 0x22
jbe 0x418216
push 0
push ebx
call sub.kernel32.dll_GetFileSize_1
and eax, 3
test eax, eax
jne 0x418216
cmp dword [esi], 0x4742444a
jne 0x418216
cmp byte [esi + 4], 1
je 0x41821a
xor eax, eax
jmp 0x41821c
mov al, 1
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x41826e
cmp byte [esi + 0x21], 0
je 0x41826e
mov eax, dword [esi + 0x1d]
neg eax
mov dword [ebp - 0x10], eax
mov edi, esi
push 0
push ebx
call sub.kernel32.dll_GetFileSize_1
shr eax, 2
test eax, eax
jle 0x418259
mov dword [ebp - 0x14], 1
mov edx, dword [edi]
add dword [ebp - 0x10], edx
add edi, 4
inc dword [ebp - 0x14]
dec eax
jne 0x41824b
mov eax, dword [ebp - 0x10]
shr eax, 8
mov edx, dword [ebp - 0x10]
shl edx, 0x18
or eax, edx
cmp eax, dword [esi + 0x1d]
sete byte [ebp - 5]
cmp byte [ebp - 5], 0
je 0x418484
mov eax, esi
add eax, dword [esi + 9]
mov dword [ebp - 0x18], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x4182e7
add edi, dword [ebp - 0x14]
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
call fcn.00418118
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x24]
mov eax, esi
mov edx, dword [ebp - 0x1c]
call fcn.004180ec
push 1
mov ecx, 0x7fffffff
mov edx, dword [ebp - 0x24]
mov eax, 0x4184e8
call fcn.00407448
mov ecx, eax
lea eax, [ebp - 0x24]
mov edx, 1
call fcn.00403a54
mov eax, dword [ebp + 8]
push eax
push 1
mov eax, dword [ebp - 0x24]
push eax
push 0
push 0
mov ecx, edi
mov dl, 1
mov al, 1
call fcn.00416200
pop ecx
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
call fcn.00418118
test al, al
jne 0x418289
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0xc]
test eax, eax
jle 0x41835a
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 8]
mov edx, eax
dec edx
xor eax, eax
call fcn.00417674
pop ecx
mov eax, dword [ebp + 8]
push eax
xor eax, eax
call fcn.004178e4
pop ecx
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x44]
test eax, eax
jbe 0x41835a
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0xc]
lea edx, [edx + edx*4]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
mov ecx, dword [ecx + 8]
mov edi, dword [ebp + 8]
sub eax, dword [ecx + edx*4 - 0x10]
mov ecx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
mov ecx, dword [ecx + 8]
mov dword [ecx + edx*4 - 0xc], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, esi
add eax, dword [esi + 0xd]
mov dword [ebp - 0x18], eax
jmp 0x418423
add edi, dword [ebp - 0x14]
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
call fcn.00418118
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x1c], eax
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
call fcn.00418118
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x20], eax
lea ecx, [ebp - 0x24]
mov eax, esi
mov edx, dword [ebp - 0x1c]
call fcn.004180ec
cmp dword [ebp - 0x20], 0
jle 0x418410
push dword [ebp - 0x24]
push 0x4184f4
lea ecx, [ebp - 0x3c]
mov eax, esi
mov edx, dword [ebp - 0x20]
call fcn.004180ec
push dword [ebp - 0x3c]
lea eax, [ebp - 0x24]
mov edx, 3
call fcn.004038d0
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov ecx, edi
mov dl, 1
call fcn.004195b8
cmp byte [ebp - 0x38], 0
je 0x418410
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
call fcn.004077b4
test al, al
je 0x418410
mov eax, dword [ebp - 0x2c]
call fcn.00403810
mov ecx, eax
inc ecx
lea eax, [ebp - 0x24]
mov edx, 1
call fcn.00403a54
mov eax, dword [ebp + 8]
push eax
push 0
mov ecx, edi
mov edx, dword [ebp - 0x24]
mov al, 1
call fcn.00416810
pop ecx
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
call fcn.00418118
test al, al
jne 0x418373
xor edi, edi
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, esi
add eax, dword [esi + 0x11]
mov dword [ebp - 0x18], eax
jmp 0x418475
add edi, dword [ebp - 0x14]
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
call fcn.00418118
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x40]
add edx, edi
xor ecx, ecx
mov eax, dword [ebp - 0x1c]
call fcn.00416e94
pop ecx
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
call fcn.00418118
test al, al
jne 0x418447
push esi
call sub.kernel32.dll_UnmapViewOfFile
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
push ebx
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4184d4
lea eax, [ebp - 0x3c]
call fcn.004035f4
lea eax, [ebp - 0x38]
mov edx, dword [0x415d40]
call fcn.00403e0c
lea eax, [ebp - 0x24]
call fcn.004035f4
lea eax, [ebp - 4]
call fcn.004035f4
ret