Function at 0x40cfed
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
mov dword [ebp - 0x10], 0
xor eax, eax
mov ax, word [0x539af6]
test eax, eax
je 0x40d014
push str._RCP____SET_SCANLIST___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor ecx, ecx
mov cx, word [0x539af0]
test ecx, ecx
je 0x40d02a
mov dword [ebp - 0x18], 0x3ab
jmp 0x40d031
mov dword [ebp - 0x18], 0x3ad
mov edx, dword [ebp - 0x18]
push edx
call fcn.004e8de9
add esp, 4
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d066
mov ecx, dword [ebp - 0x18]
push ecx
push 0x20
mov edx, dword [ebp - 8]
push edx
call fcn.004cf390
add esp, 0xc
jmp 0x40d084
xor eax, eax
mov ax, word [0x539af6]
test eax, eax
je 0x40d07d
push str._RCP__Mfp_SetScanList_____Memory_Allocation_error___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x40d3a5
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov byte [ecx], 0x1b
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov byte [eax], 0xa4
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
xor edx, edx
mov dx, word [0x539af0]
test edx, edx
jne 0x40d0e0
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov byte [eax], 0
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov byte [edx], 0
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov byte [ecx], 3
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov byte [eax], 0xa7
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov byte [edx], 0x50
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov byte [ecx], 0xe0
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov byte [eax], 0x82
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov byte [edx], 0xc2
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov byte [ecx], 0x44
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x14], 0
jmp 0x40d170
mov eax, dword [ebp - 0xc]
add eax, 0x1e
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x18]
jae 0x40d1bd
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x24
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov cl, byte [edx + 0x53a2a8]
mov byte [eax], cl
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
push 0x1e
mov eax, dword [ebp - 0x14]
imul eax, eax, 0x24
add eax, 0x53a2ac
push eax
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
push ecx
call fcn.004cfe40
add esp, 0xc
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x40d167
call fcn.0040883f
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40d201
xor eax, eax
mov ax, word [0x539af6]
test eax, eax
je 0x40d1e2
push str._PSU__Mfp_SetScanList_____Device_Open_fail
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1a0], ecx
mov edx, dword [ebp - 0x1a0]
push edx
call fcn.004e8e12
add esp, 4
xor eax, eax
jmp 0x40d3a5
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.004089d2
mov dword [ebp - 0x10], eax
xor edx, edx
mov dx, word [0x539af6]
test edx, edx
je 0x40d254
mov eax, dword [ebp - 0x10]
push eax
push 0x51a184
lea ecx, [ebp - 0x98]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x98]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.0044ce83
add esp, 8
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp - 0x18]
jne 0x40d35a
xor eax, eax
mov ax, word [0x539af0]
test eax, eax
je 0x40d275
mov dword [ebp - 0x18], 0xa
jmp 0x40d27c
mov dword [ebp - 0x18], 0xc
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.00408a86
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x40d322
xor ecx, ecx
mov cx, word [0x539af6]
test ecx, ecx
je 0x40d301
mov edx, dword [ebp - 0x18]
push edx
push str._RCP__Size_to_read___d__n
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [ebp - 0x10]
push edx
push 0x51a1b8
lea eax, [ebp - 0x198]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x198]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.0044ce83
add esp, 8
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1a4], ecx
mov edx, dword [ebp - 0x1a4]
push edx
call fcn.004e8e12
add esp, 4
mov dword [ebp - 4], 1
jmp 0x40d358
xor eax, eax
mov ax, word [0x539af6]
test eax, eax
je 0x40d339
push str._RCP__Scan2Pc:_ReadData_failed_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1a8], ecx
mov edx, dword [ebp - 0x1a8]
push edx
call fcn.004e8e12
add esp, 4
mov dword [ebp - 4], 0
jmp 0x40d390
xor eax, eax
mov ax, word [0x539af6]
test eax, eax
je 0x40d371
push str._RCP__Scan2Pc:_WriteData_failed_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1ac], ecx
mov edx, dword [ebp - 0x1ac]
push edx
call fcn.004e8e12
add esp, 4
mov dword [ebp - 4], 0
call fcn.00408962
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40d3a2
xor eax, eax
jmp 0x40d3a5
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret