Function at 0x47ad50
Capabilities:
Check for time delay via gettickcount
Encode data using xor
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x4bcdc5
mov eax, dword fs:[0]
push eax
sub esp, 0x304
mov eax, dword [0x4e3f80]
xor eax, esp
mov dword [esp + 0x300], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e3f80]
xor eax, esp
push eax
lea eax, [esp + 0x318]
mov dword fs:[0], eax
mov edi, dword [esp + 0x328]
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x2710
mov dword [ebp + 0x130], eax
cmp byte [edi], 2
je 0x47adbf
push str.buf___STX_r_n
call fcn.00477b80
add esp, 4
or eax, 0xffffffff
jmp 0x47bffe
movzx ecx, byte [edi + 1]
movzx eax, byte [edi + 2]
shl ecx, 8
or eax, ecx
movzx ecx, byte [edi + 3]
shl eax, 8
or ecx, eax
cmp ecx, dword [esp + 0x32c]
jbe 0x47adf3
push str.length___bufInLen_r_n
call fcn.00477b80
add esp, 4
or eax, 0xffffffff
jmp 0x47bffe
mov bl, byte [edi + ecx - 1]
xor dl, dl
xor eax, eax
add ecx, 0xffffffff
je 0x47ae08
xor dl, byte [edi + eax]
inc eax
cmp eax, ecx
jb 0x47ae00
cmp dl, bl
je 0x47ae21
push str.genCheckSum___checkSum_r_n
call fcn.00477b80
add esp, 4
or eax, 0xffffffff
jmp 0x47bffe
mov al, byte [edi + 4]
mov ebx, 1
cmp al, bl
jne 0x47ae46
push 0
mov eax, str.WRONG_PRINTER
mov ebx, 0xd
call fcn.0040dea0
or eax, 0xffffffff
jmp 0x47bffe
mov dword [esp + 0x18], 6
cmp al, 2
jne 0x47bece
mov al, byte [edi + 5]
mov ecx, dword [0x4ee750]
mov byte [esp + 0x23], al
mov eax, dword [ecx + 0x1c]
mov ecx, dword [eax + 0x5c]
cmp ecx, ebx
jl 0x47ae79
cmp ecx, 0xff
jle 0x47af4b
xor esi, esi
mov dword [esp + 0x1c], esi
nop
push esi
lea edx, [esp + 0x98]
push str.PRINTER_d_AVAILABLE
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [esp + 0x94]
call fcn.0046cca0
test eax, eax
je 0x47aeab
add dword [esp + 0x1c], ebx
add esi, ebx
cmp esi, 0x20
jl 0x47ae80
cmp dword [esp + 0x1c], 0
jne 0x47af4b
mov eax, dword [0x4ee750]
mov eax, dword [eax + 0x1c]
add eax, 0x64
push eax
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
test eax, eax
je 0x47af4b
mov ecx, dword [0x4ee750]
mov eax, dword [ecx + 0x1c]
add dword [0x4ee7c8], ebx
cmp dword [eax + 0x5c], ebx
jl 0x47aef0
cmp dword [eax + 0x5c], 0xff
jle 0x47af3d
lea esi, [esp + 0x1c]
call fcn.00479f10
mov dword [esp + 0x320], 0
mov ecx, dword [ebp + 0x174]
mov eax, dword [eax]
mov edx, dword [0x4ee750]
mov esi, dword [edx + 0x1c]
push ecx
push 0
push 0x4c3af8
mov ecx, eax
call fcn.00482530
lea ecx, [esp + 0x1c]
mov dword [esp + 0x320], 0xffffffff
call fcn.00401a70
mov ebx, 1
mov edx, dword [0x4ee750]
mov eax, dword [edx + 0x1c]
call fcn.00483df0
movzx eax, byte [esp + 0x23]
cmp eax, 0xc8
ja case.0x47af62.7
movzx eax, byte [eax + 0x47c05c]
jmp dword [eax*4 + 0x47c028]
cmp dword [esp + 0x32c], 0xa
jb 0x47adb7
mov cl, byte [edi + 6]
mov byte [ebp + 0xe8], cl
mov dl, byte [edi + 7]
mov byte [ebp + 0xe9], dl
mov dword [ebp + 0xe4], ebx
mov ecx, dword [edi + 8]
lea eax, [ebp + 0x111]
mov dword [eax], ecx
mov edx, dword [edi + 0xc]
mov dword [eax + 4], edx
mov ecx, dword [edi + 0x10]
mov dword [eax + 8], ecx
mov edx, dword [edi + 0x14]
push eax
mov dword [eax + 0xc], edx
lea eax, [esp + 0x20]
push eax
mov byte [ebp + 0x121], 0
call fcn.004322e0
mov dword [esp + 0x320], ebx
lea ebx, [esp + 0x1c]
call fcn.00408710
mov ecx, dword [esp + 0x1c]
push 1
push ecx
mov eax, str.PRINTER_NAME
mov ecx, ebp
call fcn.004808f0
movzx edx, byte [ebp + 0xe8]
push 1
push edx
push str.COMMS_FIRMWARE_MAJ
mov ecx, ebp
call fcn.004809b0
movzx eax, byte [ebp + 0xe9]
push 1
push eax
push str.COMMS_FIRMWARE_MIN
mov ecx, ebp
call fcn.004809b0
lea ecx, [esp + 0x24]
call fcn.0041c470
mov byte [esp + 0x320], 2
movzx ecx, byte [ebp + 0xe9]
movzx edx, byte [ebp + 0xe8]
push ecx
push edx
lea eax, [esp + 0x2c]
push str._d._.2d
push eax
call fcn.0040a120
mov esi, dword [esp + 0x34]
add esp, 0x10
push 1
push esi
mov eax, str.COMMS_FIRMWARE_ALL
mov ecx, ebp
call fcn.004808f0
push esi
push str.PrinterFirmware___s__r_n
call fcn.00477b80
add esp, 8
cmp byte [ebp + 0xe8], 1
push 1
mov ecx, ebp
jb 0x47b072
push 1
jmp 0x47b074
push 0
push str.COMMS_VIEWMESSAGE
call fcn.004809b0
movzx esi, byte [edi + 0x18]
mov eax, str.PRINTER_USER_SELECTION
mov dword [esp + 0x18], 0x19
call fcn.0046cca0
mov edi, eax
cmp edi, 1
jne 0x47b0d0
cmp esi, 0xa3
jne 0x47b105
mov ecx, dword [0x4ee750]
push 3
push str.PRINTER_USER_SELECTION
call fcn.0046c980
mov ecx, dword [0x4ee750]
push edi
push str.PRINTER_BOTH_SELECTION
call fcn.0046c980
mov edi, 3
jmp 0x47b15c
cmp edi, 2
jne 0x47b105
cmp esi, 0xa3
je 0x47b105
mov ecx, dword [0x4ee750]
push 3
push str.PRINTER_USER_SELECTION
call fcn.0046c980
mov ecx, dword [0x4ee750]
push edi
push str.PRINTER_BOTH_SELECTION
call fcn.0046c980
mov edi, 3
cmp esi, 0xa0
je 0x47b137
cmp esi, 0xa1
je 0x47b13e
cmp esi, 0xa3
je 0x47b145
lea ecx, [esp + 0x24]
call fcn.00401a70
lea ecx, [esp + 0x1c]
call fcn.00401a70
or eax, 0xffffffff
jmp 0x47bffe
push 0x1f4
jmp 0x47b161
push 0x258
jmp 0x47b161
cmp esi, 0xa2
jne 0x47b154
push 0x2bc
jmp 0x47b161
cmp esi, 0xa3
jne 0x47b171
push 0x320
mov ecx, dword [0x4ee750]
push str.COMMS_SWTYPE
call fcn.0046c980
mov eax, str.COMMS_SWTYPE
call fcn.0046cca0
cmp eax, 0x258
jne 0x47b192
push 1
push 1
push str.COMMS_PRINTTYPE
mov ecx, ebp
call fcn.004809b0
mov ecx, esi
mov ebx, ebp
call fcn.0047f480
cmp edi, 3
jne 0x47b1eb
mov eax, str.PRINTER_BOTH_SELECTION
call fcn.0046cca0
cmp eax, 1
jne 0x47b1bb
cmp esi, 0xa3
jne 0x47b1eb
push 2
jmp 0x47b1ca
cmp eax, 2
jne 0x47b1eb
cmp esi, 0xa3
je 0x47b1eb
push 1
mov ecx, dword [0x4ee750]
push str.PRINTER_BOTH_SELECTION
call fcn.0046c980
push 0
mov eax, 0x4c3af8
mov ebx, 0xdd
call fcn.0040dea0
push ebp
mov eax, str.COMMS_CONNECTED
call fcn.00480bc0
neg eax
sbb eax, eax
push 1
and eax, 4
push 0
add eax, 3
push str.VIEWPRINTS
mov ecx, ebp
mov dword [ebp + 0x4c], eax
call fcn.004809b0
push 1
push 1
push str.COMMS_CONNECTED
mov ecx, ebp
call fcn.004809b0
push 1
push 1
push str.SEND_ENABLED
mov ecx, ebp
call fcn.004809b0
push esi
push str.printType__0x_x__r_n
call fcn.00477b80
add esp, 8
cmp esi, 0xa2
jne 0x47b24f
push 1
push 2
jmp 0x47b269
cmp esi, 0xa1
je 0x47b265
cmp esi, 0xa0
je 0x47b265
push 1
push 3
jmp 0x47b269
push 1
push 1
push str.CAN_PRINT
mov ecx, ebp
call fcn.004809b0
mov eax, str.CAN_PRINT
call fcn.0046cca0
push eax
push str.CAN_PRINT___d__r_n
call fcn.00477b80
add esp, 8
mov eax, str.PAGESIZE
call fcn.0046cca0
push eax
push str.PAGE_SIZE___d__r_n
call fcn.00477b80
add esp, 8
mov eax, str.UNPRINTABLE
call fcn.0046cca0
push eax
push str.UNPRINTABLE___d__r_n
call fcn.00477b80
add esp, 8
push 1
push 1
push str.SERIALSCANCOMPLETE
mov ecx, ebp
call fcn.004809b0
push 0x4c3af6
lea ecx, [esp + 0x48]
call fcn.00408080
mov byte [esp + 0x320], 3
mov eax, dword [eax]
push eax
push ebp
mov ebx, 0x12
call fcn.00480c00
lea ecx, [esp + 0x44]
mov byte [esp + 0x320], 2
call fcn.00401a70
mov eax, ebp
call fcn.0047f8c0
test al, al
jne 0x47b31e
push 0
mov eax, 0x4c3af8
mov ebx, 0x3b
call fcn.0040dea0
lea ecx, [esp + 0x24]
call fcn.00401a70
lea ecx, [esp + 0x1c]
jmp 0x47bff5
mov dword [esp + 0x18], 7
jmp case.0x47af62.7
mov bl, byte [edi + 8]
mov dl, byte [edi + 7]
mov cl, byte [edi + 6]
mov byte [esp + 0x23], cl
movzx eax, bl
mov byte [esp + 0x2b], dl
xor ecx, ecx
add eax, 3
mov edx, 2
mul edx
seto cl
mov dword [esp + 0x18], 9
neg ecx
or ecx, eax
push ecx
call fcn.00490828
mov esi, eax
movzx ax, byte [esp + 0x27]
add ax, 0x30
mov word [esi], ax
mov al, byte [esp + 0x2f]
movzx cx, al
add cx, 0x30
add esp, 4
mov word [esi + 2], cx
test al, al
je 0x47b47f
cmp al, 4
jne 0x47b44e
movzx eax, bl
xor ecx, ecx
add eax, 0x14
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00490828
mov cx, word [esi]
mov word [eax], cx
mov dx, word [esi + 2]
mov word [eax + 2], dx
movzx ecx, byte [edi + 0xa]
movzx edx, byte [edi + 0xb]
mov dword [esp + 0x28], eax
movzx eax, byte [edi + 9]
or eax, ecx
movzx ecx, byte [edi + 0xc]
or eax, edx
or eax, ecx
add esp, 4
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0xd
cmp bl, 4
jbe 0x47b3ff
add bl, 0xfc
test bl, bl
je 0x47b428
lea eax, [esi + 4]
mov edx, dword [esp + 0x18]
movzx cx, byte [edi + edx]
inc dword [esp + 0x18]
mov word [eax], cx
dec bl
add eax, 2
xor edx, edx
mov word [eax], dx
test bl, bl
jne 0x47b406
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
lea ecx, [esi + 4]
push ecx
push eax
push str._d__s
lea edx, [edi + 4]
call fcn.0040a1c0
add esp, 0xc
push esi
call fcn.0049081d
add esp, 4
mov esi, edi
jmp 0x47b473
test bl, bl
je 0x47b473
lea eax, [esi + 4]
mov edx, dword [esp + 0x18]
movzx cx, byte [edi + edx]
inc dword [esp + 0x18]
mov word [eax], cx
dec bl
add eax, 2
xor edx, edx
mov word [eax], dx
test bl, bl
jne 0x47b455
push esi
push ebp
mov ebx, 0xce
call fcn.00480c00
push esi
call fcn.0049081d
add esp, 4
jmp case.0x47af62.7
movzx esi, byte [edi + 0xc]
movzx edx, byte [edi + 9]
movzx ecx, byte [edi + 8]
movzx eax, byte [edi + 7]
mov bl, byte [edi + 6]
push esi
movzx esi, byte [edi + 0xb]
push esi
movzx esi, byte [edi + 0xa]
push esi
push edx
push ecx
push eax
lea eax, [esp + 0x7c]
push str._.2d_.2d20_.2d_.2d_.2d_.2d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x20
movzx ecx, bl
push 1
push ecx
push str.MESSAGELOADED
mov ecx, ebp
call fcn.004809b0
push 1
lea edx, [esp + 0x68]
push edx
mov eax, str.MESSAGEDATE
mov ecx, ebp
call fcn.004808f0
mov eax, dword [edi + 0xd]
mov ecx, dword [edi + 0x11]
mov edx, dword [edi + 0x15]
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x19]
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], edx
mov byte [esp + 0x60], 0
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x47b510
sub eax, ecx
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00490828
mov esi, eax
add esp, 4
lea eax, [esp + 0x50]
push eax
push 0x4cd37c
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebp
call fcn.00480c30
test eax, eax
je 0x47b564
mov ecx, dword [0x4ee750]
push esi
push str.VIEWMESSAGE
call fcn.0046cab0
push 1
push esi
mov eax, str.VIEWMESSAGE
mov ecx, ebp
call fcn.004808f0
push esi
call fcn.0049081d
movzx ecx, byte [edi + 0x1d]
movzx eax, byte [edi + 0x1e]
movzx esi, byte [edi + 0x1f]
shl ecx, 8
or eax, ecx
shl eax, 8
or esi, eax
movzx eax, byte [edi + 0x20]
shl eax, 8
mov dword [ebp + 0x17c], eax
movzx ecx, byte [edi + 0x21]
or ecx, eax
shl ecx, 8
mov dword [ebp + 0x17c], ecx
movzx edx, byte [edi + 0x22]
or edx, ecx
mov dword [ebp + 0x17c], edx
movzx eax, byte [edi + 0x23]
shl eax, 8
mov dword [ebp + 0x178], eax
movzx ecx, byte [edi + 0x24]
xor ebx, ebx
or ecx, eax
add esp, 4
mov dword [esp + 0x1c], ebx
mov dword [ebp + 0x178], ecx
mov dword [esp + 0x18], 0x25
cmp edx, 0xffffffff
je 0x47b5f9
push ebp
mov eax, str.VIEWDELAY
call fcn.00480bc0
cmp dword [ebp + 0x17c], eax
je 0x47b5fe
mov ebx, 1
cmp dword [ebp + 0x178], 0xffffffff
je 0x47b61a
push ebp
mov eax, str.VIEWWIDTH
call fcn.00480bc0
cmp dword [ebp + 0x178], eax
je 0x47b622
mov dword [esp + 0x1c], 1
push ebp
mov eax, 0x4c4da8
call fcn.00480bc0
cmp eax, 0xffffffff
jne 0x47b63e
mov edx, dword [ebp + 0x178]
mov dword [ebp + 0x180], edx
push ebp
mov eax, str.ORI_VIEWDELAY
call fcn.00480bc0
cmp eax, 0xffffffff
jne 0x47b65a
mov eax, dword [ebp + 0x17c]
mov dword [ebp + 0x184], eax
test ebx, ebx
je 0x47b6c5
mov ecx, dword [ebp + 0x17c]
push ecx
lea edx, [esp + 0x118]
push 0x4c3af0
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 1
lea eax, [esp + 0x118]
mov edi, str.VIEWDELAY
mov ebx, ebp
call fcn.00480a70
mov eax, dword [ebp + 0x17c]
mov ecx, eax
imul ecx, eax
push ecx
lea edx, [esp + 0x118]
push 0x4c3af0
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 1
lea eax, [esp + 0x118]
mov edi, str.VIEWDELAYLOG
call fcn.00480a70
cmp dword [esp + 0x1c], 0
je 0x47b733
mov eax, dword [ebp + 0x178]
push eax
lea ecx, [esp + 0x118]
push 0x4c3af0
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 1
lea eax, [esp + 0x118]
mov edi, str.VIEWWIDTH
mov ebx, ebp
call fcn.00480a70
mov eax, dword [ebp + 0x178]
mov edx, eax
imul edx, eax
push edx
lea eax, [esp + 0x118]
push 0x4c3af0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 1
lea eax, [esp + 0x118]
mov edi, str.VIEWWIDTHLOG
call fcn.00480a70
push 1
push esi
push str.VIEWPRINTS
mov ecx, ebp
call fcn.004809b0
push ebp
call fcn.00480c30
test eax, eax
je 0x47b834
push str.VIEWMESSAGE
call fcn.0046ccd0
mov esi, eax
push str.VIEWMESSAGE
mov eax, ebp
call fcn.00480b20
mov edi, eax
mov ecx, esi
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x47b796
test dx, dx
je 0x47b792
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x47b796
add eax, 4
add ecx, 4
test dx, dx
jne 0x47b770
xor eax, eax
jmp 0x47b79b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x47b822
cmp dword [ebp + 0x1e0], 0
jne 0x47b822
push 0x4c3af6
lea ecx, [esp + 0x40]
call fcn.00408080
mov dword [esp + 0x320], 4
mov eax, dword [eax]
push 0
mov ebx, 0xca
call fcn.0040dea0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x320], 0xffffffff
call fcn.00401a70
push 0x4c3af6
lea ecx, [esp + 0x3c]
call fcn.00408080
mov dword [esp + 0x320], 5
mov eax, dword [eax]
push 0
mov ebx, 0xcb
call fcn.0040dea0
lea ecx, [esp + 0x38]
mov dword [esp + 0x320], 0xffffffff
call fcn.00401a70
push esi
call fcn.0049081d
add esp, 4
push edi
call fcn.0049081d
add esp, 4
mov dword [ebp + 0x1d8], 1
mov dword [ebp + 0x4c], 7
jmp case.0x47af62.7
mov cl, byte [edi + 6]
mov byte [ebp + 0xf0], cl
mov dl, byte [edi + 7]
mov byte [ebp + 0xf1], dl
movzx cx, byte [edi + 8]
shl cx, 8
mov word [ebp + 0xf2], cx
movzx ax, byte [edi + 9]
or ax, cx
shl ax, 8
mov word [ebp + 0xf2], ax
movzx ecx, byte [edi + 0xa]
movzx edx, dl
push ebx
or cx, ax
push edx
mov word [ebp + 0xf2], cx
push str.PRINT_STATUS
mov ecx, ebp
mov dword [esp + 0x24], 0xb
mov dword [ebp + 0xec], ebx
call fcn.004809b0
movzx eax, byte [ebp + 0xf0]
push ebx
push eax
push str.PRINT_ERRORCODE
mov ecx, ebp
call fcn.004809b0
movzx ecx, word [ebp + 0xf2]
push ebx
push ecx
push str.PRINT_NOPRINTS
mov ecx, ebp
call fcn.004809b0
push 0x4c3af8
push ebp
mov ebx, 0xcf
call fcn.00480c00
movzx eax, byte [ebp + 0xf1]
cmp eax, 4
ja case.default.0x47b8f2
jmp dword [eax*4 + 0x47c128]
push 1
push 2
push str.PRINTER_STATUS
jmp 0x47b944
push 1
push 1
push str.PRINTER_STATUS
jmp 0x47b944
push 1
push 3
push str.PRINTER_STATUS
mov ecx, ebp
call fcn.004809b0
push 1
push 1
jmp 0x47b93f
push 1
push 4
jmp 0x47b92f
push 1
push 6
push str.PRINTER_STATUS
mov ecx, ebp
call fcn.004809b0
push 1
push 0
push str.PRINTINGOFF
mov ecx, ebp
call fcn.004809b0
push 0x4c3af6
lea ecx, [esp + 0x34]
call fcn.00408080
mov dword [esp + 0x320], 6
mov edx, dword [eax]
push edx
push ebp
mov ebx, 0x12
call fcn.00480c00
lea ecx, [esp + 0x30]
call fcn.00401a70
mov dword [ebp + 0x4c], 8
mov dword [ebp + 0x1dc], 1
jmp case.0x47af62.7
mov al, byte [edi + 6]
movzx ecx, al
push ebx
push ecx
mov esi, 7
push str.PRINT_ERRORCODE
mov ecx, ebp
mov byte [ebp + 0xf0], al
mov dword [esp + 0x24], esi
mov dword [ebp + 0xec], ebx
call fcn.004809b0
push 0x4c3af6
lea ecx, [esp + 0x44]
call fcn.00408080
mov dword [esp + 0x320], esi
mov edx, dword [eax]
push edx
push ebp
lea ebx, [esi + 0xb]
call fcn.00480c00
lea ecx, [esp + 0x40]
jmp 0x47bff5
mov al, byte [edi + 6]
movzx ecx, al
push ebx
push ecx
push str.PRINT_DIAGNOSTIC
mov ecx, ebp
mov byte [ebp + 0xf8], al
mov dword [esp + 0x24], 7
mov dword [ebp + 0xf4], ebx
call fcn.004809b0
push 0x4c3af6
lea ecx, [esp + 0x50]
call fcn.00408080
mov dword [esp + 0x320], 8
mov edx, dword [eax]
push edx
push ebp
mov ebx, 0x12
call fcn.00480c00
lea ecx, [esp + 0x4c]
jmp 0x47bff5
movzx eax, byte [edi + 6]
mov byte [ebp + 0x100], al
movzx ecx, byte [edi + 7]
mov byte [ebp + 0x101], cl
mov dl, byte [edi + 8]
mov byte [ebp + 0x102], dl
movzx eax, byte [edi + 9]
mov byte [ebp + 0x103], al
movzx ecx, byte [edi + 0xa]
mov byte [ebp + 0x104], cl
movzx ax, byte [edi + 0xb]
shl ax, 8
mov word [ebp + 0x106], ax
movzx edx, byte [edi + 0xc]
or dx, ax
mov word [ebp + 0x106], dx
movzx ax, byte [edi + 0xd]
shl ax, 8
mov word [ebp + 0x108], ax
movzx ecx, byte [edi + 0xe]
or cx, ax
mov word [ebp + 0x108], cx
movzx ax, byte [edi + 0xf]
shl ax, 8
mov word [ebp + 0x10a], ax
movzx edx, byte [edi + 0x10]
or dx, ax
mov word [ebp + 0x10a], dx
movzx ax, byte [edi + 0x11]
shl ax, 8
mov word [ebp + 0x10c], ax
movzx ecx, byte [edi + 0x12]
or cx, ax
mov word [ebp + 0x10c], cx
movzx ax, byte [edi + 0x13]
shl ax, 8
mov word [ebp + 0x10e], ax
movzx edx, byte [edi + 0x14]
or dx, ax
movzx eax, word [ebp + 0x10a]
push ebx
push eax
push str.OPENOFFSET
mov ecx, ebp
mov word [ebp + 0x10e], dx
call fcn.004809b0
movzx ecx, word [ebp + 0x10c]
push ebx
push ecx
push str.CLOSEOFFSET
mov ecx, ebp
call fcn.004809b0
cmp word [ebp + 0x10e], 0xa
jae 0x47bb43
mov edx, 9
mov word [ebp + 0x10e], dx
movzx eax, word [ebp + 0x10e]
push ebx
push eax
push str.OPENTIME
mov ecx, ebp
call fcn.004809b0
cmp word [ebp + 0x108], 0
jne 0x47bb6e
mov ecx, 0xf1
mov word [ebp + 0x108], cx
movzx edx, word [ebp + 0x108]
push ebx
push edx
push str.TICKLETIME
mov ecx, ebp
call fcn.004809b0
xor ecx, ecx
mov eax, 0xf1
cmp word [ebp + 0x108], ax
push ebx
setne cl
push ecx
push str.INKTICKLE
mov ecx, ebp
call fcn.004809b0
cmp word [ebp + 0x106], 0
jne 0x47bbb8
mov edx, 0xf1
mov word [ebp + 0x106], dx
movzx eax, word [ebp + 0x106]
push ebx
push eax
push str.SPITTIME
mov ecx, ebp
call fcn.004809b0
xor edx, edx
mov ecx, 0xf1
cmp word [ebp + 0x106], cx
push ebx
setne dl
mov ecx, ebp
push edx
push str.INKSPIT
call fcn.004809b0
mov dword [ebp + 0xfc], ebx
mov al, byte [edi + 0x15]
mov byte [ebp + 0x110], al
movzx eax, al
push ebx
and eax, ebx
push eax
push str.INKTYPE
mov ecx, ebp
call fcn.004809b0
movzx ecx, byte [ebp + 0x110]
shr ecx, 1
push ebx
and ecx, ebx
push ecx
push str.PRINTDIR
mov ecx, ebp
call fcn.004809b0
movzx edx, byte [ebp + 0x110]
shr edx, 2
push ebx
and edx, ebx
push edx
push str.PRINTORIENT
mov ecx, ebp
call fcn.004809b0
movzx eax, byte [ebp + 0x110]
shr eax, 3
push ebx
and eax, ebx
push eax
push str.ENCODER
mov ecx, ebp
call fcn.004809b0
movzx ecx, byte [ebp + 0x110]
shr ecx, 4
push ebx
and ecx, ebx
push ecx
push str.TRIGGER
mov ecx, ebp
call fcn.004809b0
movzx edx, byte [ebp + 0x110]
shr edx, 5
push ebx
and edx, ebx
push edx
push str.AUTOPRINT
mov ecx, ebp
call fcn.004809b0
movzx eax, byte [ebp + 0x110]
push ebx
shr eax, 6
push eax
push str.INKSAVER
mov ecx, ebp
call fcn.004809b0
push ebp
mov eax, str.TRIGGER
call fcn.00480bc0
test eax, eax
jne 0x47bcba
push ebx
push eax
jmp 0x47bcd0
push ebp
mov eax, str.OPENTIME
call fcn.00480bc0
push ebx
cmp eax, 9
jne 0x47bcce
push ebx
jmp 0x47bcd0
push 2
push str.PRINTHEAD
mov ecx, ebp
call fcn.004809b0
mov ecx, dword [edi + 0x16]
lea eax, [ebp + 0x111]
mov dword [eax], ecx
mov edx, dword [edi + 0x1a]
mov dword [eax + 4], edx
mov ecx, dword [edi + 0x1e]
mov dword [eax + 8], ecx
mov edx, dword [edi + 0x22]
push eax
mov dword [eax + 0xc], edx
lea eax, [esp + 0x20]
push eax
mov byte [ebp + 0x121], 0
call fcn.004322e0
lea ebx, [esp + 0x1c]
mov dword [esp + 0x320], 9
call fcn.00408710
mov ecx, dword [esp + 0x1c]
push 1
push ecx
mov eax, str.PRINTER_NAME
mov ecx, ebp
call fcn.004808f0
mov al, byte [edi + 0x26]
movzx edx, al
push 1
push edx
push str.PRINTLANGUAGE
mov ecx, ebp
mov byte [ebp + 0x122], al
mov dword [esp + 0x24], 0x27
call fcn.004809b0
push 0x4c3af6
lea ecx, [esp + 0x4c]
call fcn.00408080
mov byte [esp + 0x320], 0xa
mov eax, dword [eax]
push eax
push ebp
mov ebx, 0x12
call fcn.00480c00
lea ecx, [esp + 0x48]
call fcn.00401a70
mov eax, ebp
call fcn.0047f8c0
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 3
add ecx, 5
mov dword [ebp + 0x4c], ecx
lea ecx, [esp + 0x1c]
jmp 0x47bff5
mov dl, byte [edi + 6]
mov byte [ebp + 0xc], dl
mov dword [esp + 0x18], 7
mov dword [ebp + 0x4c], 8
jmp case.0x47af62.7
mov al, byte [edi + 6]
movzx ecx, al
push ebx
push ecx
push str.PRINT_ERRORCODE
mov ecx, ebp
mov byte [ebp + 0xf0], al
mov dword [esp + 0x24], 7
mov dword [ebp + 0xec], ebx
call fcn.004809b0
push 0x4c3af6
lea ecx, [esp + 0x38]
call fcn.00408080
mov dword [esp + 0x320], 0xb
mov edx, dword [eax]
push edx
push ebp
mov ebx, 0x12
call fcn.00480c00
lea ecx, [esp + 0x34]
jmp 0x47bff5
mov al, byte [edi + 6]
movzx ecx, al
push ebx
push ecx
push str.PRINT_ERRORCODE
mov ecx, ebp
mov byte [ebp + 0xf0], al
mov dword [esp + 0x24], 7
mov dword [ebp + 0xec], ebx
call fcn.004809b0
push 0x4c3af6
lea ecx, [esp + 0x30]
call fcn.00408080
mov dword [esp + 0x320], 0xc
mov edx, dword [eax]
push edx
push ebp
mov ebx, 0x12
call fcn.00480c00
lea ecx, [esp + 0x2c]
jmp 0x47bff5
add dword [ebp + 4], ebx
cmp dword [ebp + 4], 0x20
jg 0x47bea3
push 0xc8
lea eax, [esp + 0x20]
call fcn.0047a8b0
mov esi, dword [esp + 0x1c]
push 8
push esi
lea edi, [ebp + 0x140]
call fcn.00479de0
push esi
call fcn.0049081d
add esp, 4
jmp case.0x47af62.7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp + 8]
lea edx, [esp + 0x64]
push eax
push str.time:__d
call fcn.0040a1c0
add esp, 8
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp case.0x47af62.7
movzx eax, byte [edi + 5]
cmp eax, 0x21
jne 0x47bee2
mov dword [ebp + 0x138], ebx
jmp case.0x47af62.7
test eax, eax
je 0x47bf0b
cmp eax, ebx
je 0x47bf0b
cmp eax, 2
je 0x47bf0b
push str.Error_in_printer_message
call fcn.00477b80
add esp, 4
mov dword [ebp + 0x138], 2
jmp case.0x47af62.7
push str.TEMP_MESSAGEDATE
mov eax, ebp
mov dword [ebp + 0x138], 3
call fcn.00480b20
mov esi, eax
push str.TEMP_VIEWMESSAGE
mov eax, ebp
call fcn.00480b20
push ebx
mov edi, eax
push esi
mov eax, str.MESSAGEDATE
mov ecx, ebp
call fcn.004808f0
push ebx
push ebx
push str.MESSAGELOADED
mov ecx, ebp
call fcn.004809b0
push ebx
push edi
mov eax, str.VIEWMESSAGE
mov ecx, ebp
call fcn.004808f0
push edi
call fcn.0049081d
add esp, 4
push esi
call fcn.0049081d
add esp, 4
push ebx
push 0
push str.VIEWPRINTS
mov ecx, ebp
call fcn.004809b0
push ebp
call fcn.00480c30
test eax, eax
je case.0x47af62.7
cmp dword [ebp + 0x1e0], 0
jne case.0x47af62.7
push 0x4c3af6
lea ecx, [esp + 0x30]
call fcn.00408080
mov dword [esp + 0x320], 0xd
mov eax, dword [eax]
push 0
mov ebx, 0xca
call fcn.0040dea0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x320], 0xffffffff
call fcn.00401a70
push 0x4c3af6
lea ecx, [esp + 0x28]
call fcn.00408080
mov dword [esp + 0x320], 0xe
mov eax, dword [eax]
push 0
mov ebx, 0xcb
call fcn.0040dea0
lea ecx, [esp + 0x24]
call fcn.00401a70
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x318]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x300]
xor ecx, esp
call fcn.0049dc2a
add esp, 0x310
ret 8