Function at 0x10002060
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x20
mov eax, dword [0x1001100c]
xor eax, esp
mov dword [esp + 0x1c], eax
movzx eax, byte [0x10014004]
push ebx
mov bl, byte [esp + 0x28]
push esi
push eax
movzx ecx, bl
push ecx
push str._Device_Monitor__PortRelease_Port_x__0x_02x_m_portex__0x_0x_n
push 0x10012008
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x10012008
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp bl, 2
je 0x100020a8
cmp bl, 0x20
jne 0x100020ac
mov bl, 0x20
jmp 0x100020b1
cmp bl, 0x21
jne 0x100020bb
mov dword [0x10014038], 0
call sym.ssdevm.dll_int___stdcall_Is64BitSupport_void_
test eax, eax
jne 0x100020d2
call fcn.100044f0
cmp eax, 7
jne 0x10002273
push ebp
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push str..SSPORTC
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dx, word [0x1000d41c]
mov ebp, eax
mov al, byte [0x1000d41e]
mov byte [esp + 0x1e], al
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov word [esp + 0x18], ax
lea eax, [esp + 0x1c]
mov word [esp + 0x1c], dx
lea ecx, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x10002120
push 0
sub eax, ecx
lea ecx, [esp + 0x10]
push ecx
push 0xa
lea edx, [esp + 0x1c]
push edx
add eax, 1
push eax
lea eax, [esp + 0x30]
push eax
push 0x9c402408
push ebp
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1000226b
push edi
mov edi, str.SCAN
lea esi, [esp + 0x14]
mov ecx, 5
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x10002177
mov byte [0x10014004], 0x20
jmp 0x1000226a
mov edi, 0x1000d410
lea esi, [esp + 0x14]
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x10002197
mov byte [0x10014004], 0x21
jmp 0x1000226a
mov edi, 0x1000d40c
lea esi, [esp + 0x14]
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x100021b7
mov byte [0x10014004], 0x80
jmp 0x1000226a
mov edi, str.PRINT
lea esi, [esp + 0x14]
mov ecx, 6
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x100021d7
mov byte [0x10014004], 0x10
jmp 0x1000226a
mov edi, str.SMART
lea esi, [esp + 0x14]
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x100021f4
mov byte [0x10014004], 0x77
jmp 0x1000226a
mov edi, str.INST
lea esi, [esp + 0x14]
mov ecx, 5
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x10002211
mov byte [0x10014004], 0x99
jmp 0x1000226a
mov edi, str.FAXTO
lea esi, [esp + 0x14]
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x1000222e
mov byte [0x10014004], 0x50
jmp 0x1000226a
mov edi, str.USEPT
lea esi, [esp + 0x14]
mov ecx, 6
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x1000224b
mov byte [0x10014004], 5
jmp 0x1000226a
xor edx, edx
mov edi, str.FAXSM
lea esi, [esp + 0x14]
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
setne al
sub al, 1
and eax, 0x51
mov byte [0x10014004], al
pop edi
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
cmp bl, 1
je 0x1000227d
cmp bl, 0x10
jne 0x10002287
mov dword [0x10014014], 1
cmp byte [0x10014004], bl
mov eax, dword [0x10014034]
je 0x100022ab
test eax, eax
jg 0x100022ab
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.10004b28
add esp, 0x20
ret
cmp bl, 1
je 0x100022b5
cmp bl, 0x10
jne 0x100022c1
test eax, eax
jle 0x100022c1
sub eax, 1
mov dword [0x10014034], eax
cmp dword [0x10014010], 0
je 0x100022d5
test eax, eax
mov byte [0x10014004], 0xaa
jle 0x100022dc
mov byte [0x10014004], 0
call sym.ssdevm.dll_int___stdcall_Is64BitSupport_void_
test eax, eax
jne 0x100022f3
call fcn.100044f0
cmp eax, 7
jne 0x1000238e
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push str..SSPORTC
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor ecx, ecx
cmp dword [0x10014034], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov word [esp + 0x20], cx
jg 0x10002331
mov dword [esp + 0x18], 0x544f4e
jmp 0x10002347
mov ecx, dword [str.USEPT]
mov dx, word [0x1000d3e8]
mov dword [esp + 0x18], ecx
mov word [esp + 0x1c], dx
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ecx
mov word [esp + 0x14], cx
lea ecx, [esp + 0x18]
lea esi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x10002360
push 0
lea edx, [esp + 0xc]
push edx
push 0xa
sub ecx, esi
lea edx, [esp + 0x18]
push edx
add ecx, 1
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x9c402408
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov ecx, dword [esp + 0x24]
pop esi
pop ebx
mov eax, 1
xor ecx, esp
mov dword [0x1001401c], eax
call fcn.10004b28
add esp, 0x20
ret