Function at 0x442806
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [0x4cc8c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x25c]
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push 0x42
push ebx
push eax
call fcn.00466ad0
push 0x104
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.00466ad0
push 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.00466ad0
push esi
mov dword [ebp - 0x210], ebx
call fcn.00451684
add esp, 0x28
test eax, eax
jne 0x442cc4
push 0x1616
push 0x4a5b78
push 0x489570
push esi
call fcn.004137d1
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x44289d
push esi
push str.PrinterLoadConfig___FAILED:_Could_not_open_the_given_file___s__for_reading.
call fcn.0040d9e1
pop ecx
jmp 0x442cc3
push 0x161d
push 0x4a5b78
push edi
call fcn.00440f18
add esp, 0xc
test eax, eax
je 0x442cbd
push edi
call fcn.00440f4d
pop ecx
test eax, eax
je 0x442cbd
push ebx
push 0x42
lea eax, [ebp - 0x25c]
push 1
push eax
call fcn.0046a8f7
add esp, 0x10
cmp eax, 0x42
je 0x4428f6
push 0x42
push eax
push esi
push str.:5:PrinterLoadConfig___s___FAILED:_Could_only_read__d_bytes_of__d_for_the_PRINTDLG_struct_
call fcn.0040d511
add esp, 0x10
jmp 0x442aa8
cmp dword [ebp - 0x254], 0
je 0x4429f9
push ebx
push 4
lea eax, [ebp - 0x210]
push 1
push eax
call fcn.0046a8f7
add esp, 0x10
cmp eax, 4
je 0x44292e
push esi
push str.:5:PrinterLoadConfig___s___FAILED:_Could_not_read_the_size_of_the_DEVMODE_struct.
call fcn.0040d511
pop ecx
pop ecx
jmp 0x442aa8
mov eax, dword [ebp - 0x210]
push eax
test eax, eax
jle 0x4429e4
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x254], eax
test eax, eax
je 0x4429d5
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x4429b2
push ebx
push dword [ebp - 0x210]
push 1
push eax
call fcn.0046a8f7
add esp, 0x10
cmp eax, dword [ebp - 0x210]
je 0x4429a4
push dword [ebp - 0x210]
push eax
push esi
push str.:5:PrinterLoadConfig___s___FAILED:_Could_only_read__d_bytes_of__d_for_the_DEVMODE_struct_
call fcn.0040d511
add esp, 0x10
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x254]
jmp 0x442aa2
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x4429f9
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebp - 0x254], 0
push 0
push str.:4:PrinterLoadConfig___encountered_a_problem:_Could_not_GlobalLock_pdData.hDevMode____ld_:__GetLastError_
call fcn.0040d9e1
pop ecx
pop ecx
jmp 0x4429f9
push dword [ebp - 0x210]
push 0x42
push str.:4:PrinterLoadConfig___encountered_a_problem:_Could_not_GlobalAlloc__ld___d_:_OUT_OF_MEMORY.
jmp 0x4429f1
and dword [ebp - 0x254], 0
push esi
push str.:7:PrinterLoadConfig___encountered_a_problem:_The_file___s__specifies_a_DevMode_that_is_of_size__ld
call fcn.0040d9e1
add esp, 0xc
cmp dword [ebp - 0x250], 0
je 0x442b0e
and dword [ebp - 0x210], 0
lea eax, [ebp - 0x210]
push ebx
push 4
push 1
push eax
call fcn.0046a8f7
add esp, 0x10
cmp eax, 4
je 0x442a31
push esi
push str.:5:PrinterLoadConfig___s___FAILED:_Could_not_read_the_size_of_the_DEVNAMES_struct.
jmp 0x442922
mov eax, dword [ebp - 0x210]
push eax
test eax, eax
jle 0x442af9
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x250], eax
test eax, eax
je 0x442aea
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x442ac7
push ebx
push dword [ebp - 0x210]
push 1
push eax
call fcn.0046a8f7
add esp, 0x10
cmp eax, dword [ebp - 0x210]
je 0x442ab9
push dword [ebp - 0x210]
push eax
push esi
push str.:5:PrinterLoadConfig___s___FAILED:_Could_only_read__d_bytes_of__d_for_the_DEVNAMES_struct_
call fcn.0040d511
add esp, 0x10
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call fcn.004433f8
push ebx
call fcn.00413646
jmp 0x442897
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x442b0e
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebp - 0x250], 0
push 0
push str.PrinterLoadConfig___encountered_a_problem:_Could_not_GlobalLock_pdData.hDevNames____ld_:__GetLastError_
call fcn.0040d9e1
pop ecx
pop ecx
jmp 0x442b0e
push dword [ebp - 0x210]
push 0x42
push str.PrinterLoadConfig___encountered_a_problem:_Could_not_GlobalAlloc__ld___d_:_OUT_OF_MEMORY.
jmp 0x442b06
and dword [ebp - 0x250], 0
push esi
push str.PrinterLoadConfig___encountered_a_problem:_The_file___s__specifies_a_DevNames_that_is_of_size__ld
call fcn.0040d9e1
add esp, 0xc
cmp dword [edi + 0x14], 0
je 0x442b34
push dword [edi + 0x14]
call dword [sym.imp.GDI32.dll_DeleteDC]
test eax, eax
jne 0x442b30
push dword [edi + 0x14]
push str.PrinterLoadConfig___encountered_a_problem:_DeleteDC__ld__FAILED__The_printer_DC_could_not_be_deleted:__GetLastError_
call fcn.0040d511
pop ecx
pop ecx
and dword [edi + 0x14], 0
cmp dword [edi + 0xc], 0
je 0x442b56
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test eax, eax
je 0x442b52
push str.PrinterLoadConfig___encountered_a_problem:_GlobalFree___FAILED__The_printer_setting_hDevMode_could_not_be_freed:__GetLastError_
call fcn.0040d9e1
pop ecx
and dword [edi + 0xc], 0
cmp dword [edi + 0x10], 0
je 0x442b78
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test eax, eax
je 0x442b74
push str.PrinterLoadConfig___encountered_a_problem:_GlobalFree___FAILED__The_printer_setting_hDevNames_could_not_be_freed:__GetLastError_
call fcn.0040d9e1
pop ecx
and dword [edi + 0x10], 0
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x442bd7
movzx eax, word [esi + 2]
test ax, ax
je 0x442baa
add eax, esi
push 0x104
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.00452b01
add esp, 0xc
movzx eax, word [esi]
test ax, ax
je 0x442bc9
add eax, esi
push 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.00452b01
add esp, 0xc
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x442be9
push dword [ebp - 0x250]
push str.PrinterLoadConfig___encountered_a_problem:_Could_not_GlobalLock_pdData.hDevNames__for_pDevNames___ld_:__GetLastError_
call fcn.0040d9e1
pop ecx
pop ecx
lea eax, [ebp - 0x20c]
push eax
call fcn.00470560
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x108]
push eax
call fcn.00470560
mov dword [ebp - 0x214], eax
lea ecx, [edi + 4]
push 0x42
lea eax, [ebp - 0x25c]
push eax
push ecx
call fcn.00466550
add esp, 0x14
cmp dword [ebp - 0x254], 0
je 0x442caa
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x442c9f
xor eax, eax
cmp eax, dword [ebp - 0x214]
lea eax, [ebp - 0x108]
push esi
sbb ecx, ecx
and ecx, eax
xor eax, eax
cmp eax, dword [ebp - 0x218]
push 0
push ecx
sbb eax, eax
lea ecx, [ebp - 0x20c]
and eax, ecx
push eax
call dword [sym.imp.GDI32.dll_CreateDCA]
push dword [ebp - 0x254]
mov dword [edi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [edi + 0x14], 0
jne 0x442caa
push esi
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
push str.PrinterLoadConfig___FAILED:_CreateDC__s___s__NULL___p__FAILED:__GetLastError_
call fcn.0040d9e1
add esp, 0x10
jmp 0x442caa
push str.PrinterLoadConfig___Could_not_Lock_hDevMode_for_CreateDC__:__GetLastError_
call fcn.0040d9e1
pop ecx
push edi
call fcn.004433f8
push ebx
call fcn.00413646
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x442cc6
push ebx
call fcn.00413646
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004654a8
leave
ret