Function at 0x46559b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [0x5025d0]
xor eax, esp
mov dword [esp + 0x268], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
push 0x3e
mov dword [esp + 0x14], eax
lea eax, [esp + 0x20]
mov edi, ecx
push ebx
push eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ebx
call fcn.004a8c80
mov esi, 0x103
push esi
lea eax, [esp + 0x179]
push ebx
push eax
mov byte [esp + 0x180], bl
call fcn.004a8c80
push esi
lea eax, [esp + 0x7d]
push ebx
push eax
mov byte [esp + 0x84], bl
call fcn.004a8c80
mov edx, dword [esp + 0x34]
add esp, 0x24
mov dword [esp + 0xc], ebx
call fcn.00477a16
test eax, eax
jne 0x4658df
mov ecx, dword [esp + 0x10]
push 0x160b
push str..Printer.c
mov edx, 0x4c722c
call fcn.0041bb64
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [esp + 0x10], esi
je 0x4658df
mov eax, edi
call fcn.004672bf
test eax, eax
je 0x4658d8
mov edx, edi
call fcn.004672d0
test eax, eax
je 0x4658d8
push esi
push 0x42
lea eax, [esp + 0x20]
push 1
push eax
call fcn.004a8fc5
add esp, 0x10
cmp eax, 0x42
jne 0x46578a
cmp dword [esp + 0x20], ebx
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
je 0x465714
push dword [esp + 0x10]
lea eax, [esp + 0x10]
push 4
push 1
push eax
mov dword [esp + 0x1c], ebx
call fcn.004a8fc5
add esp, 0x10
cmp eax, 4
jne 0x46578a
cmp dword [esp + 0xc], ebx
jle 0x465710
push dword [esp + 0xc]
push 0x42
call esi
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x465714
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebx
je 0x465706
push dword [esp + 0x10]
push dword [esp + 0x10]
push 1
push eax
call fcn.004a8fc5
add esp, 0x10
cmp eax, dword [esp + 0xc]
push dword [esp + 0x20]
je 0x4656fe
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [esp + 0x20]
jmp 0x465784
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x465714
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esp + 0x20], ebx
cmp dword [esp + 0x24], ebx
je 0x4657b0
push dword [esp + 0x10]
lea eax, [esp + 0x10]
push 4
push 1
push eax
mov dword [esp + 0x1c], ebx
call fcn.004a8fc5
add esp, 0x10
cmp eax, 4
jne 0x46578a
cmp dword [esp + 0xc], ebx
jle 0x4657ac
push dword [esp + 0xc]
push 0x42
call esi
cmp eax, ebx
mov dword [esp + 0x24], eax
je 0x4657b0
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebx
je 0x4657a2
push dword [esp + 0x10]
push dword [esp + 0x10]
push 1
push eax
call fcn.004a8fc5
add esp, 0x10
cmp eax, dword [esp + 0xc]
push dword [esp + 0x24]
je 0x46579a
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, edi
call fcn.00467303
mov ecx, dword [esp + 0x10]
jmp 0x4658da
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x4657b0
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esp + 0x24], ebx
mov eax, dword [edi + 0x14]
cmp eax, ebx
je 0x4657c1
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
mov dword [edi + 0x14], ebx
mov eax, dword [edi + 0xc]
cmp eax, ebx
je 0x4657d2
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi + 0xc], ebx
mov eax, dword [edi + 0x10]
cmp eax, ebx
je 0x4657e3
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi + 0x10], ebx
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
cmp esi, ebx
je 0x465849
movzx eax, word [esi + 2]
cmp ax, bx
mov edi, 0x104
jbe 0x465818
movzx eax, ax
add eax, esi
push eax
mov ecx, edi
lea eax, [esp + 0x16c]
call fcn.00477a48
pop ecx
jmp 0x46581f
mov byte [esp + 0x168], bl
movzx eax, word [esi]
cmp ax, bx
jbe 0x46583b
movzx eax, ax
add eax, esi
push eax
mov ecx, edi
lea eax, [esp + 0x64]
call fcn.00477a48
pop ecx
jmp 0x46583f
mov byte [esp + 0x60], bl
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea eax, [esp + 0x60]
push eax
call fcn.004a7f30
xor ecx, ecx
cmp ecx, eax
sbb esi, esi
lea eax, [esp + 0x64]
and esi, eax
lea eax, [esp + 0x16c]
push eax
call fcn.004a7f30
xor ecx, ecx
cmp ecx, eax
sbb edi, edi
lea eax, [esp + 0x170]
and edi, eax
push 0x42
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
add eax, 4
push eax
call fcn.004a8580
add esp, 0x14
cmp dword [esp + 0x20], ebx
je 0x4658c1
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebx
je 0x4658c1
push eax
push ebx
push edi
push esi
call dword [sym.imp.GDI32.dll_CreateDCA]
mov ecx, dword [esp + 0x14]
push dword [esp + 0x20]
mov dword [ecx + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x14]
call fcn.00467303
mov ecx, dword [esp + 0x10]
call fcn.0041bf91
xor eax, eax
inc eax
jmp 0x4658e1
mov ecx, esi
call fcn.0041bf91
xor eax, eax
mov ecx, dword [esp + 0x274]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004a8565
mov esp, ebp
pop ebp
ret