Function at 0x461730
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x22c
mov eax, dword [0x4e3f80]
xor eax, esp
mov dword [esp + 0x224], eax
mov eax, dword [esp + 0x234]
push ebx
push ebp
mov ebp, dword [esp + 0x238]
push esi
push edi
push 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], 1
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [ebp + 0x6c]
mov esi, eax
lea edx, [esp + 0x24]
push edx
mov eax, ecx
cdq
and edx, 3
add eax, edx
push ecx
sar eax, 2
push esi
mov dword [esp + 0x30], 0
call fcn.00477d00
add esp, 0xc
mov ebx, eax
push ebx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [ebp + 0x6c]
push 0xcc0020
push 0
mov eax, ecx
cdq
push 0
push esi
and edx, 3
add eax, edx
sar eax, 2
push eax
push ecx
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
mov ebx, dword [esp + 0x20]
xor edi, edi
cmp ebx, 0xffffffff
jne 0x4617eb
mov dword [esp + 0x14], edi
jmp 0x461a2e
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
lea eax, [esp + 0x1c]
push eax
push 2
lea ecx, [esp + 0x28]
push ecx
push ebx
mov byte [esp + 0x30], 0xff
mov byte [esp + 0x31], 0xfe
call esi
cmp dword [esp + 0x18], 2
je 0x461816
mov dword [esp + 0x14], edi
push str._THEME
lea edx, [esp + 0x2c]
call fcn.0040a1c0
lea eax, [esp + 0x2c]
add esp, 4
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x461830
sub eax, edx
push edi
sar eax, 1
lea edx, [esp + 0x1c]
push edx
add eax, eax
push eax
lea ecx, [esp + 0x34]
push ecx
push ebx
call esi
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x461857
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
cmp edx, dword [esp + 0x18]
je 0x461873
mov dword [esp + 0x14], edi
cmp dword [ebp + 0x130], edi
je 0x461883
cmp dword [ebp + 0x134], edi
je 0x4618fc
push str.COMMS_CONNECTED
call fcn.0046ccd0
mov esi, eax
cmp esi, edi
je 0x4618fc
push esi
call fcn.0049e31d
push esi
mov edi, eax
call fcn.0049081d
add esp, 8
test edi, edi
je 0x4618fa
push str.VIEWDELAY
xor esi, esi
call fcn.0046ccd0
mov edi, eax
test edi, edi
je 0x4618cb
push edi
call fcn.0049e31d
push edi
mov esi, eax
call fcn.0049081d
add esp, 8
push str.VIEWWIDTH
mov dword [ebp + 0x118], esi
xor edi, edi
call fcn.0046ccd0
mov esi, eax
test esi, esi
je 0x4618f4
push esi
call fcn.0049e31d
push esi
mov edi, eax
call fcn.0049081d
add esp, 8
mov dword [ebp + 0x11c], edi
xor edi, edi
mov eax, dword [ebp + 8]
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.00449160
fld dword [ebp + 0xfc]
mov edx, dword [esp + 0x28]
mov eax, dword [ebp + 0x11c]
mov ecx, dword [ebp + 0x118]
add esp, 8
push edx
movzx edx, byte [ebp + 0x121]
push eax
movzx eax, byte [ebp + 0x120]
push ecx
mov ecx, dword [ebp + 0x8c]
push edx
mov edx, dword [ebp + 0x6c]
push eax
push ecx
sub esp, 8
fstp qword [esp]
push edx
push 0x30001
push str.version__d__paperSize__d__zoomLevel__.0f__xPositionDots__d__startOfDayHours__d__startOfDayMinutes__d__delay__d__width__d___barcodeMatch__s_
lea edx, [esp + 0x54]
call fcn.0040a1c0
lea eax, [esp + 0x54]
add esp, 0x2c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x461964
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
sub eax, edx
push edi
sar eax, 1
lea ecx, [esp + 0x1c]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x34]
push eax
push ebx
call esi
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x461992
sub eax, edx
sar eax, 1
lea ecx, [eax + eax]
cmp ecx, dword [esp + 0x18]
je 0x4619ae
mov dword [esp + 0x14], edi
push 0x4cbba0
lea edx, [esp + 0x2c]
call fcn.0040a1c0
lea eax, [esp + 0x2c]
add esp, 4
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4619c6
sub eax, edx
push edi
sar eax, 1
lea edx, [esp + 0x1c]
push edx
add eax, eax
push eax
lea ecx, [esp + 0x34]
push ecx
push ebx
call esi
lea eax, [esp + 0x28]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4619f0
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
cmp edx, dword [esp + 0x18]
je 0x461a0c
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x461a2c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor edi, edi
mov esi, dword [ebp + 0xa4]
cmp esi, edi
je 0x461a6a
jmp 0x461a40
cmp dword [esp + 0x14], edi
je 0x461adc
mov eax, esi
mov ecx, dword [eax + 8]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
mov esi, dword [esi]
lea eax, [esp + 0x18]
push eax
push ebx
call edx
test eax, eax
jne 0x461a66
mov dword [esp + 0x14], edi
cmp esi, edi
jne 0x461a40
cmp dword [esp + 0x14], edi
je 0x461adc
push str.__THEME__r_n
lea edx, [esp + 0x2c]
call fcn.0040a1c0
lea eax, [esp + 0x2c]
add esp, 4
lea edx, [eax + 2]
jmp 0x461a90
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x461a90
sub eax, edx
push edi
sar eax, 1
lea ecx, [esp + 0x1c]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x34]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x28]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x461ac0
sub eax, edx
sar eax, 1
lea ecx, [eax + eax]
cmp ecx, dword [esp + 0x18]
je 0x461adc
mov dword [esp + 0x14], edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x234]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0049dc2a
add esp, 0x22c
ret 8