Function at 0x42d5d2
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
and dword [ebp - 0x1c], 0
and dword [ebp - 0x244], 0
movsd xmm0, qword [0x42aa68]
movsd qword [ebp - 0x38], xmm0
movsd xmm0, qword [0x42aa68]
movsd qword [ebp - 0x30], xmm0
movsd xmm0, qword [0x42aa68]
movsd qword [ebp - 0x18], xmm0
movsd xmm0, qword [0x42aa68]
movsd qword [ebp - 0x28], xmm0
and dword [ebp - 0x3c], 0
mov dword [ebp - 0xc], 0x4287d0
and dword [ebp - 8], 0
mov dword [ebp - 4], 0xf000c
push dword [ebp + 8]
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.MSVCR100.dll_strcpy]
pop ecx
pop ecx
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.WINSPOOL.DRV_OpenPrinterA]
test eax, eax
je 0x42da20
cmp dword [ebp - 0x1c], 0
je 0x42da20
push 3
push 0
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_SetPrinterA]
test eax, eax
je 0x42da17
lea eax, [ebp - 0x244]
push eax
push 0
push 0
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_GetPrinterA]
cmp dword [ebp - 0x244], 0
jbe 0x42da17
push dword [ebp - 0x244]
push 2
call dword [sym.imp.MSVCR100.dll_calloc]
pop ecx
pop ecx
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x42da17
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 0x244]
push dword [ebp - 0x3c]
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_GetPrinterA]
test eax, eax
je 0x42da0d
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x48], 0
jne 0x42da0d
movsd xmm0, qword [ebp + 0x20]
comisd xmm0, xmmword [0x42aa68]
jbe 0x42d87f
cmp dword [ebp + 0x30], 1
jne 0x42d771
movsd xmm0, qword [ebp + 0x10]
mulsd xmm0, qword [0x42aa88]
movsd qword [ebp - 0x38], xmm0
movsd xmm0, qword [ebp + 0x18]
mulsd xmm0, qword [0x42aa88]
movsd qword [ebp - 0x30], xmm0
movsd xmm0, qword [ebp + 0x20]
comisd xmm0, xmmword [0x42aa68]
jbe 0x42d74e
movsd xmm0, qword [ebp + 0x20]
mulsd xmm0, qword [0x42aa80]
movsd qword [ebp - 0x18], xmm0
movsd xmm0, qword [ebp + 0x28]
comisd xmm0, xmmword [0x42aa68]
jbe 0x42d76f
movsd xmm0, qword [ebp + 0x28]
mulsd xmm0, qword [0x42aa80]
movsd qword [ebp - 0x28], xmm0
jmp 0x42d7dd
cmp dword [ebp + 0x30], 2
jne 0x42d7dd
movsd xmm0, qword [ebp + 0x10]
mulsd xmm0, qword [0x42aa78]
movsd qword [ebp - 0x38], xmm0
movsd xmm0, qword [ebp + 0x10]
mulsd xmm0, qword [0x42aa78]
movsd qword [ebp - 0x30], xmm0
movsd xmm0, qword [ebp + 0x20]
comisd xmm0, xmmword [0x42aa68]
jbe 0x42d7bc
movsd xmm0, qword [ebp + 0x20]
mulsd xmm0, qword [0x42aa70]
movsd qword [ebp - 0x18], xmm0
movsd xmm0, qword [ebp + 0x28]
comisd xmm0, xmmword [0x42aa68]
jbe 0x42d7dd
movsd xmm0, qword [ebp + 0x28]
mulsd xmm0, qword [0x42aa70]
movsd qword [ebp - 0x28], xmm0
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
mov dword [eax + 0x28], 0xf
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
mov cx, word [ebp + 0x34]
mov word [eax + 0x2c], cx
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
mov ecx, 0x100
mov word [eax + 0x2e], cx
cvttsd2si eax, qword [ebp - 0x18]
mov ecx, dword [ebp - 0x3c]
mov ecx, dword [ecx + 0x1c]
mov word [ecx + 0x32], ax
movsd xmm0, qword [ebp - 0x28]
comisd xmm0, xmmword [0x42aa68]
jbe 0x42d834
cvttsd2si eax, qword [ebp - 0x28]
mov ecx, dword [ebp - 0x3c]
mov ecx, dword [ecx + 0x1c]
mov word [ecx + 0x30], ax
push dword [ebp - 0x244]
push dword [ebp - 0x3c]
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_SetPrinterA]
test eax, eax
je 0x42d87d
cmp dword [ebp + 0xc], 0
je 0x42d87d
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
movsx eax, word [eax + 0x3a]
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
movsd xmm1, qword [ebp - 0x18]
divsd xmm1, qword [0x42aa70]
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
jmp 0x42d8e1
push 0x4287d4
push dword [ebp + 8]
call dword [sym.imp.MSVCR100.dll_strcmp]
pop ecx
pop ecx
test eax, eax
jne 0x42d8e1
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
mov dword [eax + 0x28], 0xe
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
mov ecx, 0x2d0
mov word [eax + 0x32], cx
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
mov ecx, 0x7ff8
mov word [eax + 0x30], cx
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
mov ecx, 0x100
mov word [eax + 0x2e], cx
push dword [ebp - 0x244]
push dword [ebp - 0x3c]
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_SetPrinterA]
cvttsd2si eax, qword [ebp - 0x38]
mov dword [ebp - 0x258], eax
cvttsd2si eax, qword [ebp - 0x38]
mov dword [ebp - 0x254], eax
cvttsd2si eax, qword [ebp - 0x30]
mov dword [ebp - 0x250], eax
cvttsd2si eax, qword [ebp - 0x30]
mov dword [ebp - 0x24c], eax
and dword [ebp - 0x248], 0
push 0x4287d4
push dword [ebp + 8]
call dword [sym.imp.MSVCR100.dll_strcmp]
pop ecx
pop ecx
test eax, eax
jne 0x42d941
push 4
push 0x4287e4
push 0x404270
call dword [sym.imp.MSVCR100.dll_memcmp]
add esp, 0xc
test eax, eax
je 0x42d991
lea eax, [ebp - 0x248]
push eax
push 0xf003f
push 0
push 0x4287f0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x42d991
push 0x10
lea eax, [ebp - 0x258]
push eax
push 3
push 0
push 0x428834
push dword [ebp - 0x248]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x42d991
push dword [ebp - 0x248]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0x38], 0
je 0x42d9f6
mov dword [ebp - 0x264], 0x428840
and dword [ebp - 0x260], 0
mov dword [ebp - 0x25c], 0x4287d0
lea eax, [ebp - 0x264]
push eax
push 1
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_StartDocPrinterA]
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_StartPagePrinter]
lea eax, [ebp - 0x268]
push eax
push 5
push 0x42884c
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_WritePrinter]
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_EndPagePrinter]
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_EndDocPrinter]
push dword [ebp - 0x3c]
call dword [sym.imp.MSVCR100.dll_free]
pop ecx
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
mov al, 1
jmp 0x42da22
push dword [ebp - 0x3c]
call dword [sym.imp.MSVCR100.dll_free]
pop ecx
push dword [ebp - 0x1c]
call dword [sym.imp.WINSPOOL.DRV_ClosePrinter]
xor al, al
leave
ret 0x34