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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47203d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x491130]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
mov edx, dword [ebx + 8]
sub esp, 8
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x60], ecx
xor ecx, ecx
mov dword [edi], ecx
mov dword [edx], ecx
mov dword [eax], ecx
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x64], edx
mov dword [eax], ecx
mov eax, esp
lea ecx, [ebp - 0x54]
mov dword [eax], str.mapEntireFileForReading
mov dword [eax + 4], 0x17
call fcn.00418990
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x40b713
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea ecx, [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x5c], eax
call fcn.00415a40
mov byte [ebp - 4], 1
mov ecx, eax
cmp dword [eax + 0x14], 0x10
jb 0x40b650
mov ecx, dword [eax]
mov eax, dword [eax + 0x10]
sub esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, esp
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push 0x16
mov dword [eax], 0xd
mov dword [eax + 4], 0
mov dword [eax + 8], ecx
lea eax, [ebp - 0x38]
push str.CreateFile___error:_
push eax
call fcn.00434350
add esp, 0x1c
mov ecx, dword [ebp - 0x5c]
lea edx, [ebp - 0x38]
mov byte [ebp - 4], 2
push edx
push 4
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, dword [ebp - 0x24]
cmp ecx, 0x10
jb 0x40b6ca
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b6c0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ba91
push ecx
push edx
call fcn.0044b9a2
add esp, 8
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
cmp ecx, 0x10
jb 0x40b7e4
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b7da
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ba91
jmp 0x40b7da
lea ecx, [ebp - 0x74]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x78], eax
cmp eax, 0xffffffff
jne 0x40b7f4
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x40b7f1
call esi
mov esi, eax
lea ecx, [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x5c], eax
call fcn.00415a40
mov byte [ebp - 4], 3
mov ecx, eax
cmp dword [eax + 0x14], 0x10
jb 0x40b75d
mov ecx, dword [eax]
mov eax, dword [eax + 0x10]
sub esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, esp
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push 0x17
mov dword [eax], 0xd
mov dword [eax + 4], 0
mov dword [eax + 8], ecx
lea eax, [ebp - 0x38]
push str.GetFileSize___error:_
push eax
call fcn.00434350
add esp, 0x1c
mov ecx, dword [ebp - 0x5c]
lea edx, [ebp - 0x38]
mov byte [ebp - 4], 4
push edx
push 4
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, dword [ebp - 0x24]
cmp ecx, 0x10
jb 0x40b6ca
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b6c0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ba91
jmp 0x40b6c0
push ecx
push edx
call fcn.0044b9a2
add esp, 8
test esi, esi
je 0x40ba64
jmp 0x40ba13
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x74]
test ecx, ecx
jne 0x40b9fc
cmp eax, 0x8000000
ja 0x40b9fc
mov edx, dword [ebp - 0x60]
push ecx
push eax
push ecx
push 2
push ecx
mov dword [edx], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ecx, dword [ebp - 0x64]
mov dword [ecx], eax
test eax, eax
jne 0x40b909
mov esi, dword [ebp - 0x54]
lea ecx, [ebp - 0x50]
call fcn.00415a40
mov byte [ebp - 4], 5
mov ecx, eax
cmp dword [eax + 0x14], 0x10
jb 0x40b843
mov ecx, dword [eax]
mov eax, dword [eax + 0x10]
sub esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, esp
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push 0x1d
mov dword [eax], 0xd
mov dword [eax + 4], 0
mov dword [eax + 8], ecx
lea eax, [ebp - 0x38]
push str.CreateFileMapping___error:_
push eax
call fcn.00434350
add esp, 0x1c
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x38]
mov eax, dword [esi]
push ecx
push 4
mov ecx, esi
call dword [eax + 8]
mov ecx, dword [ebp - 0x24]
cmp ecx, 0x10
jb 0x40b8bc
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b8b2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ba91
push ecx
push edx
call fcn.0044b9a2
add esp, 8
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
cmp ecx, 0x10
jb 0x40b902
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b8f8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ba91
push ecx
push edx
call fcn.0044b9a2
add esp, 8
xor esi, esi
jmp 0x40ba64
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, dword [ebp - 0x6c]
mov dword [esi], eax
test eax, eax
jne 0x40b902
mov esi, dword [ebp - 0x54]
lea ecx, [ebp - 0x50]
call fcn.00415a40
mov byte [ebp - 4], 7
mov ecx, eax
cmp dword [eax + 0x14], 0x10
jb 0x40b93a
mov ecx, dword [eax]
mov eax, dword [eax + 0x10]
sub esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, esp
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push 0x19
mov dword [eax], 0xd
mov dword [eax + 4], 0
mov dword [eax + 8], ecx
lea eax, [ebp - 0x38]
push str.MapViewOfFile___error:_
push eax
call fcn.00434350
add esp, 0x1c
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x38]
mov eax, dword [esi]
push ecx
push 4
mov ecx, esi
call dword [eax + 8]
mov ecx, dword [ebp - 0x24]
cmp ecx, 0x10
jb 0x40b9b3
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b9a9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ba91
push ecx
push edx
call fcn.0044b9a2
add esp, 8
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
cmp ecx, 0x10
jb 0x40b902
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b8f8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40b8f8
jmp 0x40ba91
push str.File_appears_too_large.
push dword [ebp - 0x54]
mov dword [ebp - 0x58], 8
call fcn.0040b2f0
add esp, 8
mov eax, dword [ebp - 0x60]
mov esi, dword [ebp - 0x6c]
mov dword [eax], 0
mov eax, dword [esi]
test eax, eax
je 0x40ba32
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esi], 0
mov ecx, dword [ebp - 0x64]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ecx]
test eax, eax
je 0x40ba4d
push eax
call esi
mov eax, dword [ebp - 0x64]
mov dword [eax], 0
mov eax, dword [edi]
test eax, eax
je 0x40ba61
cmp eax, 0xffffffff
je 0x40ba61
push eax
call esi
mov dword [edi], 0
mov esi, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x40ba71
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044b98f
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00451171
int3