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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x101d5abc]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x234
mov edi, edx
mov dword [ebp - 0x220], eax
push 8
mov ebx, ecx
push edi
mov dword [ebp - 0x218], ebx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x101454ec
mov eax, dword [ebp - 0x220]
mov ecx, 0x1002c42c
mov dword [esi + 4], ebx
lea ebx, [esi + 0x228]
and dword [ebx], 0
and dword [esi + 0x224], 0
mov dword [esi], 0x666e7469
mov dword [esi + 8], edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x101452c8
test dx, dx
je 0x101452c4
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x101452c8
add eax, 4
add ecx, 4
test dx, dx
jne 0x101452a2
xor eax, eax
jmp 0x101452cd
sbb eax, eax
or eax, 1
test eax, eax
jne 0x101452e6
mov ecx, dword [ebp - 0x218]
mov edx, edi
call fcn.10116130
test eax, eax
je 0x101454e1
lea eax, [ebp - 0x21c]
mov ecx, 0x208
push eax
push ecx
lea edi, [esi + 0xc]
mov dword [ebp - 0x21c], ecx
push edi
push 1
push 0
push 0
call dword [sym.imp.WINSPOOL.DRV_GetPrinterDriverDirectoryW]
test eax, eax
je 0x101454e1
push 0x5c
push edi
call sub.msvcrt.dll_wcsrchr
pop ecx
pop ecx
test eax, eax
je 0x10145324
xor ecx, ecx
mov word [eax], cx
push 0x10030f24
mov edx, 0x104
mov ecx, edi
call fcn.10045073
lea eax, [ebp - 0x21c]
mov ecx, 0x208
push eax
push ecx
lea eax, [ebp - 0x214]
mov dword [ebp - 0x21c], ecx
push eax
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0x220]
push dword [ebp - 0x218]
call dword [sym.imp.WINSPOOL.DRV_GetPrinterDataW]
cmp eax, 0xea
je 0x10145377
test eax, eax
jne 0x101454e1
lea eax, [ebp - 0x214]
push 0x5c
push eax
call sub.msvcrt.dll_wcsrchr
pop ecx
pop ecx
test eax, eax
je 0x10145390
add eax, 2
jmp 0x10145396
lea eax, [ebp - 0x214]
push eax
mov edx, 0x104
mov ecx, edi
call fcn.10045073
test ebx, ebx
je 0x10145417
push 0
push 0x100080
push 3
push 0
push 1
push SysReAllocStringLen
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10145430
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x21c], eax
cmp eax, 0xffffffff
je 0x10145422
xor eax, eax
push eax
push eax
push eax
push 2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x218], eax
test eax, eax
je 0x10145422
xor ecx, ecx
push ecx
push ecx
push ecx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push dword [ebp - 0x218]
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebx], 0
je 0x10145422
jmp 0x10145433
mov edi, dword [ebp - 0x228]
cmp edi, 0xffffffff
je 0x10145433
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or edi, 0xffffffff
test ebx, ebx
je 0x10145433
and dword [ebx], 0
mov eax, dword [ebx]
mov dword [esi + 0x214], eax
test eax, eax
je 0x101454e1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
mov dword [esi + 0x218], edi
cmp dword [ebp - 0x21c], 0x30
jb 0x101454e1
cmp dword [edi], 0x31464655
jne 0x101454e1
cmp dword [edi + 4], 0x10001
jne 0x101454e1
cmp dword [edi + 8], 0x30
jne 0x101454e1
mov ebx, dword [edi + 0x18]
test ebx, ebx
je 0x101454c1
mov eax, dword [edi + 0xc]
push 0x24
pop ecx
mul ecx
test edx, edx
ja 0x101454e1
jb 0x10145490
cmp eax, 0xffffffff
ja 0x101454e1
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x218], eax
push ecx
mov edx, ebx
mov ecx, eax
call fcn.10044c0e
test eax, eax
js 0x101454e1
mov eax, dword [ebp - 0x21c]
cmp eax, dword [ebp - 0x218]
jb 0x101454e1
lea eax, [ebx + edi]
mov dword [esi + 0x21c], eax
xor eax, eax
mov dword [esi + 0x224], 1
mov dword [esi + 0x220], eax
mov dword [esi + 0x22c], eax
mov dword [esi + 0x230], eax
jmp 0x101454ea
mov ecx, esi
call fcn.10145503
xor esi, esi
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101885f0
leave
ret 4