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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x1019fbfc]
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 0x101259a8
mov eax, dword [ebp - 0x220]
mov ecx, 0x10026b40
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 0x10125783
test dx, dx
je 0x1012577f
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10125783
add eax, 4
add ecx, 4
test dx, dx
jne 0x1012575d
xor eax, eax
jmp 0x10125788
sbb eax, eax
or eax, 1
test eax, eax
jne 0x101257a1
mov ecx, dword [ebp - 0x218]
mov edx, edi
call fcn.100ecd2e
test eax, eax
je 0x1012599d
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 0x1012599d
push 0x5c
push edi
call sub.msvcrt.dll_wcsrchr
pop ecx
pop ecx
test eax, eax
je 0x101257df
xor ecx, ecx
mov word [eax], cx
push 0x1002d1b4
mov edx, 0x104
mov ecx, edi
call fcn.1003fcc9
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 0x10125832
test eax, eax
jne 0x1012599d
lea eax, [ebp - 0x214]
push 0x5c
push eax
call sub.msvcrt.dll_wcsrchr
pop ecx
pop ecx
test eax, eax
je 0x1012584b
add eax, 2
jmp 0x10125851
lea eax, [ebp - 0x214]
push eax
mov edx, 0x104
mov ecx, edi
call fcn.1003fcc9
test ebx, ebx
je 0x101258d2
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 0x101258e7
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x21c], eax
cmp eax, 0xffffffff
je 0x101258d8
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 0x101258d8
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
jne 0x101258ee
jmp 0x101258d8
mov edi, dword [ebp - 0x228]
cmp edi, 0xffffffff
je 0x101258e7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or edi, 0xffffffff
test ebx, ebx
je 0x101258ee
and dword [ebx], 0
cmp dword [ebx], 0
mov eax, dword [ebx]
mov dword [esi + 0x214], eax
je 0x1012599d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
mov dword [esi + 0x218], edi
cmp dword [ebp - 0x21c], 0x30
jb 0x1012599d
cmp dword [edi], 0x31464655
jne 0x1012599d
cmp dword [edi + 4], 0x10001
jne 0x1012599d
cmp dword [edi + 8], 0x30
jne 0x1012599d
mov ebx, dword [edi + 0x18]
test ebx, ebx
je 0x1012597d
mov eax, dword [edi + 0xc]
push 0x24
pop ecx
mul ecx
test edx, edx
ja 0x1012599d
jb 0x1012594c
cmp eax, 0xffffffff
ja 0x1012599d
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x218], eax
push ecx
mov edx, ebx
mov ecx, eax
call fcn.1003f931
test eax, eax
js 0x1012599d
mov eax, dword [ebp - 0x21c]
cmp eax, dword [ebp - 0x218]
jb 0x1012599d
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 0x101259a6
mov ecx, esi
call fcn.101259b9
xor esi, esi
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101637b0
leave
ret 4