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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x22c], edx
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x224], edx
mov dword [ebp - 0x21c], edx
mov esi, eax
xor eax, eax
push ebp
push 0x45ffc3
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x45fdbb
push 0x104
lea eax, [ebp - 0x216]
push eax
push esi
call sub.kernel32.dll_GetModuleFileNameW
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x216]
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
jmp 0x45fdea
push 0x104
lea eax, [ebp - 0x216]
push eax
push esi
call sub.kernel32.dll_GetModuleFileNameA_1
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x216]
push eax
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
cmp esi, 0xffffffff
je 0x45fea8
push 0
push 0
push 0
push 2
push 0
push esi
call sub.kernel32.dll_CreateFileMappingA
mov edi, eax
test edi, edi
je 0x45fea2
push 0
push 0
push 0
push 4
push edi
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x45fe9c
mov eax, dword [ebp - 4]
call fcn.0040f9f0
test eax, eax
je 0x45fe93
cmp word [eax + 0x18], 0x20b
jne 0x45fe43
add eax, 0x18
add eax, 0x40
mov dword [ebp - 0xc], eax
jmp 0x45fe49
add eax, 0x58
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
je 0x45fe93
push 0
push esi
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 4]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.0045fce4
mov ecx, eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
sub edx, eax
sub edx, 4
mov eax, dword [ebp - 0xc]
add eax, 4
call fcn.0045fce4
add eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
cmp eax, dword [edx]
je 0x45fe93
mov bl, 1
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push edi
call sub.kernel32.dll_CloseHandle_1
push esi
call sub.kernel32.dll_CloseHandle_1
test bl, bl
je 0x45ff7e
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x45fee8
push 0x10
push 0
lea edx, [ebp - 0x21c]
mov eax, dword [0x53072c]
mov ecx, dword [eax]
call dword [ecx + 0x2a0]
mov eax, dword [ebp - 0x21c]
call fcn.004050f8
push eax
push 0
call sub.user32.dll_MessageBoxW
jmp 0x45ff23
push 0x10
push 0
lea edx, [ebp - 0x224]
mov eax, dword [0x53072c]
mov ecx, dword [eax]
call dword [ecx + 0x2a0]
mov edx, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
call fcn.00404a20
mov eax, dword [ebp - 0x220]
call fcn.00404c58
push eax
push 0
call sub.user32.dll_MessageBoxA_1
push 0
call sub.kernel32.dll_GetModuleHandleA_2
cmp eax, dword [0x52ff04]
je 0x45ff77
mov eax, 0x53072c
call fcn.00406870
lea edx, [ebp - 0x22c]
mov eax, dword [0x53072c]
mov ecx, dword [eax]
call dword [ecx + 0x2a0]
mov edx, dword [ebp - 0x22c]
lea eax, [ebp - 0x228]
call fcn.00404a20
mov edx, dword [ebp - 0x228]
mov eax, dword [0x408834]
call fcn.004088a0
call fcn.00404140
jmp 0x45ff7e
push 0
call sub.kernel32.dll_ExitProcess_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45ffca
lea eax, [ebp - 0x22c]
call fcn.00404f44
lea eax, [ebp - 0x228]
call fcn.00404788
lea eax, [ebp - 0x224]
call fcn.00404f44
lea eax, [ebp - 0x220]
call fcn.00404788
lea eax, [ebp - 0x21c]
call fcn.00404f44
ret