Function at 0x475d52
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [0x55f900]
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.004c37f0
push 0x104
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.004c37f0
push 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.004c37f0
push esi
mov dword [ebp - 0x210], ebx
call fcn.0048c30a
add esp, 0x28
test eax, eax
jne 0x476210
push 0x1610
push 0x51c3c0
push 0x4e75e0
push esi
call fcn.00422a3e
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x475de9
push esi
push str.PrinterLoadConfig___FAILED:_Could_not_open_the_given_file___s__for_reading.
call fcn.0041cce9
pop ecx
jmp 0x47620f
push 0x1617
push 0x51c3c0
push edi
call fcn.00473abb
add esp, 0xc
test eax, eax
je 0x476209
push edi
call fcn.00473af0
pop ecx
test eax, eax
je 0x476209
push ebx
push 0x42
lea eax, [ebp - 0x25c]
push 1
push eax
call fcn.004c7617
add esp, 0x10
cmp eax, 0x42
je 0x475e42
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.0041c80a
add esp, 0x10
jmp 0x475ff4
cmp dword [ebp - 0x254], 0
je 0x475f45
push ebx
push 4
lea eax, [ebp - 0x210]
push 1
push eax
call fcn.004c7617
add esp, 0x10
cmp eax, 4
je 0x475e7a
push esi
push str.:5:PrinterLoadConfig___s___FAILED:_Could_not_read_the_size_of_the_DEVMODE_struct.
call fcn.0041c80a
pop ecx
pop ecx
jmp 0x475ff4
mov eax, dword [ebp - 0x210]
push eax
test eax, eax
jle 0x475f30
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x254], eax
test eax, eax
je 0x475f21
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x475efe
push ebx
push dword [ebp - 0x210]
push 1
push eax
call fcn.004c7617
add esp, 0x10
cmp eax, dword [ebp - 0x210]
je 0x475ef0
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.0041c80a
add esp, 0x10
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x254]
jmp 0x475fee
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x475f45
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.0041cce9
pop ecx
pop ecx
jmp 0x475f45
push dword [ebp - 0x210]
push 0x42
push str.:4:PrinterLoadConfig___encountered_a_problem:_Could_not_GlobalAlloc__ld___d_:_OUT_OF_MEMORY.
jmp 0x475f3d
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.0041cce9
add esp, 0xc
cmp dword [ebp - 0x250], 0
je 0x47605a
and dword [ebp - 0x210], 0
lea eax, [ebp - 0x210]
push ebx
push 4
push 1
push eax
call fcn.004c7617
add esp, 0x10
cmp eax, 4
je 0x475f7d
push esi
push str.:5:PrinterLoadConfig___s___FAILED:_Could_not_read_the_size_of_the_DEVNAMES_struct.
jmp 0x475e6e
mov eax, dword [ebp - 0x210]
push eax
test eax, eax
jle 0x476045
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x250], eax
test eax, eax
je 0x476036
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x476013
push ebx
push dword [ebp - 0x210]
push 1
push eax
call fcn.004c7617
add esp, 0x10
cmp eax, dword [ebp - 0x210]
je 0x476005
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.0041c80a
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.004789d2
push ebx
call fcn.004228b3
jmp 0x475de3
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x47605a
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.0041cce9
pop ecx
pop ecx
jmp 0x47605a
push dword [ebp - 0x210]
push 0x42
push str.PrinterLoadConfig___encountered_a_problem:_Could_not_GlobalAlloc__ld___d_:_OUT_OF_MEMORY.
jmp 0x476052
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.0041cce9
add esp, 0xc
cmp dword [edi + 0x14], 0
je 0x476080
push dword [edi + 0x14]
call dword [sym.imp.GDI32.dll_DeleteDC]
test eax, eax
jne 0x47607c
push dword [edi + 0x14]
push str.PrinterLoadConfig___encountered_a_problem:_DeleteDC__ld__FAILED__The_printer_DC_could_not_be_deleted:__GetLastError_
call fcn.0041c80a
pop ecx
pop ecx
and dword [edi + 0x14], 0
cmp dword [edi + 0xc], 0
je 0x4760a2
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test eax, eax
je 0x47609e
push str.PrinterLoadConfig___encountered_a_problem:_GlobalFree___FAILED__The_printer_setting_hDevMode_could_not_be_freed:__GetLastError_
call fcn.0041cce9
pop ecx
and dword [edi + 0xc], 0
cmp dword [edi + 0x10], 0
je 0x4760c4
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test eax, eax
je 0x4760c0
push str.PrinterLoadConfig___encountered_a_problem:_GlobalFree___FAILED__The_printer_setting_hDevNames_could_not_be_freed:__GetLastError_
call fcn.0041cce9
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 0x476123
movzx eax, word [esi + 2]
test ax, ax
je 0x4760f6
add eax, esi
push 0x104
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.0048dd2a
add esp, 0xc
movzx eax, word [esi]
test ax, ax
je 0x476115
add eax, esi
push 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0048dd2a
add esp, 0xc
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x476135
push dword [ebp - 0x250]
push str.PrinterLoadConfig___encountered_a_problem:_Could_not_GlobalLock_pdData.hDevNames__for_pDevNames___ld_:__GetLastError_
call fcn.0041cce9
pop ecx
pop ecx
lea eax, [ebp - 0x20c]
push eax
call fcn.004cd280
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x108]
push eax
call fcn.004cd280
mov dword [ebp - 0x214], eax
lea ecx, [edi + 4]
push 0x42
lea eax, [ebp - 0x25c]
push eax
push ecx
call fcn.004c3270
add esp, 0x14
cmp dword [ebp - 0x254], 0
je 0x4761f6
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x4761eb
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 0x4761f6
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.0041cce9
add esp, 0x10
jmp 0x4761f6
push str.PrinterLoadConfig___Could_not_Lock_hDevMode_for_CreateDC__:__GetLastError_
call fcn.0041cce9
pop ecx
push edi
call fcn.004789d2
push ebx
call fcn.004228b3
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x476212
push ebx
call fcn.004228b3
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c2120
leave
ret