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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x101a4c2c]
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 - 0x21c], eax
push 8
mov ebx, ecx
push edi
mov dword [ebp - 0x220], ebx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x101280fc
mov eax, dword [ebp - 0x21c]
mov ecx, 0x100266e0
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 0x10127ed6
test dx, dx
je 0x10127ed2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10127ed6
add eax, 4
add ecx, 4
test dx, dx
jne 0x10127eb0
xor eax, eax
jmp 0x10127edb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10127ef4
mov ecx, dword [ebp - 0x220]
mov edx, edi
call fcn.100ee655
test eax, eax
je 0x101280f1
lea eax, [ebp - 0x218]
mov ecx, 0x208
push eax
push ecx
lea edi, [esi + 0xc]
mov dword [ebp - 0x218], ecx
push edi
push 1
push 0
push 0
call dword [sym.imp.WINSPOOL.DRV_GetPrinterDriverDirectoryW]
test eax, eax
je 0x101280f1
push 0x5c
push edi
call sub.msvcrt.dll_wcsrchr
pop ecx
pop ecx
test eax, eax
je 0x10127f32
xor ecx, ecx
mov word [eax], cx
push 0x1002cd30
mov edx, 0x104
mov ecx, edi
call fcn.1003f209
lea eax, [ebp - 0x218]
mov ecx, 0x208
push eax
push ecx
lea eax, [ebp - 0x214]
mov dword [ebp - 0x218], ecx
push eax
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
call dword [sym.imp.WINSPOOL.DRV_GetPrinterDataW]
cmp eax, 0xea
je 0x10127f85
test eax, eax
jne 0x101280f1
lea eax, [ebp - 0x214]
push 0x5c
push eax
call sub.msvcrt.dll_wcsrchr
pop ecx
pop ecx
test eax, eax
je 0x10127f9e
add eax, 2
jmp 0x10127fa4
lea eax, [ebp - 0x214]
push eax
mov edx, 0x104
mov ecx, edi
call fcn.1003f209
test ebx, ebx
je 0x10128025
push 0
push 0x100080
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x1012803a
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x218], eax
cmp eax, 0xffffffff
je 0x1012802b
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 - 0x220], eax
test eax, eax
je 0x1012802b
xor ecx, ecx
push ecx
push ecx
push ecx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push dword [ebp - 0x220]
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebx], 0
jne 0x10128041
jmp 0x1012802b
mov edi, dword [ebp - 0x228]
cmp edi, 0xffffffff
je 0x1012803a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or edi, 0xffffffff
test ebx, ebx
je 0x10128041
and dword [ebx], 0
cmp dword [ebx], 0
mov eax, dword [ebx]
mov dword [esi + 0x214], eax
je 0x101280f1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
mov dword [esi + 0x218], edi
cmp dword [ebp - 0x218], 0x30
jb 0x101280f1
cmp dword [edi], 0x31464655
jne 0x101280f1
cmp dword [edi + 4], 0x10001
jne 0x101280f1
cmp dword [edi + 8], 0x30
jne 0x101280f1
mov ebx, dword [edi + 0x18]
test ebx, ebx
je 0x101280d1
mov ecx, dword [edi + 0xc]
lea eax, [ebp - 0x21c]
push eax
push 0x24
pop edx
call fcn.1003ed79
test eax, eax
js 0x101280f1
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x21c]
push eax
mov edx, ebx
call fcn.1003ed54
test eax, eax
js 0x101280f1
mov eax, dword [ebp - 0x218]
cmp eax, dword [ebp - 0x21c]
jb 0x101280f1
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 0x101280fa
mov ecx, esi
call fcn.1012810f
xor esi, esi
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10166ce0
mov esp, ebp
pop ebp
ret 4