Function at 0x4027c0
Capabilities:
Get disk information
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0xb1c
mov dl, byte [0x421d68]
push ebx
push ebp
push esi
push edi
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x13d]
mov byte [esp + 0x13c], dl
mov ebx, dword [esp + 0xb34]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x75]
mov byte [esp + 0x74], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ebp, ebx
mov byte [esp + 0x13], 1
and ebp, 0xff
stosb byte es:[edi], al
push ebp
lea eax, [esp + 0x330]
push str.DosDevicesLPT_d
push eax
call fcn.0040cce6
mov edi, dword [esp + 0xb3c]
add esp, 0xc
lea eax, [esp + 0x32c]
lea esi, [edi + 0x84]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x402860
test cl, cl
je 0x40285c
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x402860
add eax, 2
add esi, 2
test cl, cl
jne 0x40283c
xor eax, eax
jmp 0x402865
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402df2
cmp bl, 3
jbe 0x4028c9
mov al, byte [0x54815c]
push 0xc8
test al, al
jne 0x402890
mov ecx, dword [0x548158]
lea eax, [esp + 0x78]
push eax
push 0x40
push ecx
jmp 0x40289d
mov eax, dword [0x548158]
lea edx, [esp + 0x78]
push edx
push 0x42
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
mov edx, dword [0x439344]
push 0x40
lea ecx, [esp + 0x78]
push str.ModifyCOMLPT
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb1c
ret
lea eax, [esp + 0x1c]
push 3
push eax
call fcn.004026b0
mov al, byte [esp + ebp + 0x23]
add esp, 8
test al, al
je 0x402956
mov al, byte [0x54815c]
push 0xc8
test al, al
jne 0x4028fe
mov edx, dword [0x548158]
lea ecx, [esp + 0x78]
push ecx
push 0x3f
push edx
jmp 0x40290c
mov ecx, dword [0x548158]
lea eax, [esp + 0x78]
push eax
push 0x43
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
lea edx, [esp + 0x74]
push ebp
lea eax, [esp + 0x140]
push edx
push eax
call fcn.0040cce6
mov edx, dword [0x439344]
add esp, 0xc
lea ecx, [esp + 0x13c]
push 0x44
push str.ModifyCOMLPT
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
jne 0x402956
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb1c
ret
push ebp
call fcn.00401940
add esp, 4
test eax, eax
je 0x40298e
mov ecx, dword [0x439344]
push 0x44
lea eax, [esp + 0x78]
push str.ModifyCOMLPT
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
jne 0x40298e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb1c
ret
lea edx, [esp + 0x32c]
push 0x1ff
lea ebx, [edi + 0x84]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
jne 0x4029b5
mov byte [esp + 0x13], al
jmp 0x402aa7
mov edi, str.._
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x60]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x60]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 3
mov ecx, edx
push eax
push eax
and ecx, 3
lea eax, [esp + 0x74]
push 0x80000000
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov al, byte [0x54815c]
test al, al
push 0xc8
jne 0x402a43
mov edx, dword [0x548158]
lea ecx, [esp + 0x140]
push ecx
push 0x3f
push edx
jmp 0x402a54
mov ecx, dword [0x548158]
lea eax, [esp + 0x140]
push eax
push 0x43
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
lea edx, [esp + 0x13c]
push ebx
lea eax, [esp + 0x78]
push edx
push eax
call fcn.0040cce6
add esp, 0xc
cmp esi, 0xffffffff
jne 0x402aa0
mov edx, dword [0x439344]
push 0x14
lea ecx, [esp + 0x78]
push str.ModifyCOMLPT
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
jne 0x402aa0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb1c
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
lea eax, [esp + 0x30]
push str.LPT_d
push eax
call fcn.0040cce6
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov al, byte [esp + 0x13]
not ecx
dec ecx
test al, al
mov dword [esp + 0x14], ecx
je 0x402c5e
lea ecx, [esp + 0x32c]
push 0x1ff
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
je 0x402b25
mov esi, dword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
push 0
push ebx
push 2
call esi
mov edi, eax
lea edx, [esp + 0x32c]
lea eax, [esp + 0x2c]
push edx
push eax
push 1
call esi
test eax, eax
jne 0x402b7c
test edi, edi
je 0x402b25
lea ecx, [esp + 0x32c]
push ecx
push ebx
push 1
call esi
mov al, byte [0x54815c]
push 0xc8
test al, al
jne 0x402b42
mov eax, dword [0x548158]
lea edx, [esp + 0x78]
push edx
push 0x3c
push eax
jmp 0x402b50
mov edx, dword [0x548158]
lea ecx, [esp + 0x78]
push ecx
push 0x44
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
mov ecx, dword [0x439344]
push 0x10
lea eax, [esp + 0x78]
push str.ModifyCOMLPT
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb1c
ret
push ebp
lea edx, [esp + 0x30]
push 0x417508
push edx
call fcn.0040cce6
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
lea eax, [esp + 0x18]
push eax
push 0xf003f
not ecx
push 0
dec ecx
push str.HardwareDeviceMapPARALLEL_PORTS
push 0x80000002
mov dword [esp + 0x28], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402c53
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
xor esi, esi
mov ebx, 0x200
lea ecx, [esp + 0x20]
lea edx, [esp + 0x72c]
push ecx
lea ecx, [esp + 0x2c]
push edx
push ecx
lea edx, [esp + 0x30]
push 0
lea ecx, [esp + 0x93c]
mov eax, esi
push edx
mov edx, dword [esp + 0x2c]
push ecx
push eax
push edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebx
inc esi
call edi
test eax, eax
jne 0x402c53
cmp dword [esp + 0x28], 1
jne 0x402bd2
mov eax, dword [esp + 0xb30]
lea ecx, [esp + 0x72c]
add eax, 0x84
push eax
push ecx
call fcn.0040ce70
add esp, 8
test eax, eax
je 0x402bd2
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x1c]
push eax
push 1
lea ecx, [esp + 0x938]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
lea ecx, [esp + 0x30]
push 0x4174cc
push ecx
call fcn.0040cce6
mov eax, dword [0x548158]
add esp, 0xc
lea edx, [esp + 0x52c]
push 0x100
push edx
push 0x1d
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
je 0x402ce8
mov edx, dword [esp + 0xb30]
mov eax, dword [0x4171bc]
push 0
lea ecx, [esp + 0x630]
push 0x100
push ecx
push 0
add edx, 0xd8
push 0
push edx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x402ce8
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x62c]
push ecx
lea eax, [esp + 0x530]
push edx
lea ecx, [esp + 0x334]
push eax
push ecx
call fcn.0040cce6
add esp, 0x10
jmp 0x402d10
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x32c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xb30]
lea edi, [esp + 0x32c]
xor eax, eax
lea edx, [esp + 0x32c]
lea esi, [ecx + 0xd8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [0x4171bc]
not ecx
push ecx
push edx
push 0xc
push esi
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceRegistryPropertyA]
mov ecx, dword [0x4171bc]
push 0xf003f
push 1
push 0
push 1
push esi
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov edi, eax
cmp edi, 0xffffffff
jne 0x402d72
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb1c
ret
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
push edx
push eax
push 1
push 0
push 0x41709c
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [0x4171bc]
mov ecx, 0x4a
xor eax, eax
lea edi, [esp + 0x204]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x204]
mov dword [esp + 0x204], 0x128
push ecx
push esi
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstallParamsA]
test eax, eax
je 0x402df2
mov edi, dword [esp + 0x208]
mov ecx, dword [0x4171bc]
lea eax, [esp + 0x204]
or edi, 0x4000
push eax
push esi
push ecx
mov dword [esp + 0x214], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceInstallParamsA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xb1c
ret