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

Disassembly:
push 0xffffffffffffffff
push 0x431b7b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
push edi
push 0x184
call fcn.004277ad
add esp, 4
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x28]
mov dword [esp + 0x1c], 0
test eax, eax
je 0x4112d7
push edi
mov ecx, eax
call fcn.00411540
mov esi, eax
jmp 0x4112d9
xor esi, esi
mov ebx, dword [esp + 0x24]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push ebx
mov dword [esp + 0x38], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
jne 0x411348
test edi, edi
je 0x411323
mov eax, dword [edi]
push str.Failed_to_open_file
mov ecx, edi
call dword [eax + 0x10]
mov edx, dword [edi]
push ebx
push str.filename
mov ecx, edi
call dword [edx + 0x2c]
test esi, esi
je 0x41144b
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esi + 8]
push 0
push 0
push 0
push 2
push 0
push ecx
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esi + 0xc], eax
jne 0x411395
test edi, edi
je 0x41143f
mov edx, dword [edi]
push str.Failed_to_create_file_mapping
mov ecx, edi
call dword [edx + 0x10]
mov eax, dword [edi]
push ebx
push str.filename
mov ecx, edi
call dword [eax + 0x2c]
jmp 0x41143f
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
mov dword [esi + 0x10], ebp
jne 0x4113eb
test edi, edi
je 0x4113ca
mov eax, dword [edi]
push str.Failed_to_map_view_of_file
mov ecx, edi
call dword [eax + 0x10]
mov edx, dword [edi]
push ebx
push str.filename
mov ecx, edi
call dword [edx + 0x2c]
test esi, esi
je 0x41144b
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret
cmp word [ebp], 0x5a4d
je 0x411403
test edi, edi
je 0x41143f
mov edx, dword [edi]
push str.Failed_to_find_DOS_signature
jmp 0x41137e
push ebp
lea ecx, [esi + 0x24]
call fcn.00420fe0
mov ebx, dword [ebp + 0x3c]
push 4
add ebx, ebp
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x411460
test edi, edi
je 0x41143f
mov eax, dword [edi]
push str.Failed_to_find_NT_header
mov ecx, edi
call dword [eax + 0x10]
mov eax, dword [esp + 0x24]
mov edx, dword [edi]
push eax
push str.filename
mov ecx, edi
call dword [edx + 0x2c]
test esi, esi
je 0x41144b
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret
push ebx
lea ecx, [esi + 0x68]
call fcn.00420f70
xor ecx, ecx
xor eax, eax
mov cx, word [ebx + 0x14]
mov ax, word [ebx + 6]
push eax
lea edx, [ecx + ebx + 0x18]
lea ecx, [esi + 0x164]
push edx
call fcn.00420ea0
mov ecx, esi
mov dword [esi + 0x14], ebp
mov dword [esi + 0x18], ebx
call fcn.00411500
mov ecx, esi
call fcn.004111f0
mov ecx, dword [esp + 0x14]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret