Function at 0x402ba5
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x178
and byte [ebp - 1], 0
and byte [ebp - 3], 0
and byte [ebp - 4], 0
push ebx
push esi
push edi
xor edi, edi
mov byte [ebp - 2], 1
cmp dword [ebp + 8], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 8], edi
je 0x4030ba
push 6
lea eax, [ebp - 0x1c]
push edi
push eax
call sub.MSVCRT.dll_memset
push 0xc
push edi
push dword [ebp + 8]
call sub.MSVCRT.dll_memset
push 0x100
lea eax, [ebp - 0x178]
push edi
push eax
call sub.MSVCRT.dll_memset
push str.LUMPDRV
lea eax, [ebp - 0x78]
push str.._s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x30
cmp dword [0x40b690], 1
jne 0x402c2e
lea eax, [ebp - 0x78]
push eax
push str.CreateFile__s_n
call esi
pop ecx
pop ecx
push edi
push 0x40000000
push 3
push edi
push edi
lea eax, [ebp - 0x78]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x4030a6
inc dword [0x40b470]
lea ecx, [ebp - 0x178]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push eax
call fcn.00402ad0
add esp, 0xc
test al, al
jne 0x402c9c
cmp dword [0x40b690], 1
jne 0x402c82
push str.No_bound_network_cards_available_n
call esi
pop ecx
dec dword [0x40b470]
jne 0x4030ba
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4030ba
cmp byte [0x40b688], 0
mov ebx, 0x40c280
jne 0x402f37
cmp dword [0x40b690], 1
jne 0x402cbf
push str.Driver_not_provided_by_the_user_n
call esi
pop ecx
lea eax, [ebp - 0xc]
push eax
push str.SOFTWAREIBMLicense_Use_Runtime
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x402e45
cmp dword [0x40b690], 1
jne 0x402cec
push str._SOFTWAREIBMLicense_Use_Runtime__key_created_n
call esi
pop ecx
lea eax, [ebp - 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
lea eax, [ebp - 0x28]
push edi
push eax
push edi
mov edi, str.I4DRIVER
push edi
push dword [ebp - 0xc]
call esi
test eax, eax
jne 0x402e2c
cmp dword [0x40b690], 1
jne 0x402d24
push str._I4DRIVER__key_found_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [ebp - 0x24], eax
je 0x402e20
push dword [ebp - 0x14]
push 0
push eax
call sub.MSVCRT.dll_memset
push 0x100
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0x18
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x28]
push dword [ebp - 0x24]
push eax
push 0
push edi
push dword [ebp - 0xc]
call esi
test eax, eax
jne 0x402e2c
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x24]
xor esi, esi
and byte [eax + edi - 1], 0
cmp dword [ebp - 0x14], esi
jbe 0x402dcd
cmp byte [esi + edi], 0x23
je 0x402d8d
inc esi
cmp esi, dword [ebp - 0x14]
jb 0x402d81
cmp esi, dword [ebp - 0x14]
jae 0x402dcd
add esi, edi
lea eax, [esi + 1]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
cmp dword [0x40b690], 1
pop ecx
mov dword [ebp - 8], eax
jne 0x402db9
push eax
push str.Number_of_cards_stored_in_the_registry:__d_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
pop ecx
mov eax, dword [ebp - 0x10]
and byte [esi], 0
cmp eax, dword [ebp - 8]
jle 0x402dee
mov byte [ebp - 3], 1
mov dword [ebp - 8], eax
jmp 0x402dee
mov eax, dword [ebp - 0x10]
cmp dword [0x40b690], 1
mov byte [ebp - 3], 1
mov dword [ebp - 8], eax
jne 0x402dee
push eax
push str.Number_of_network_cards:__d_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
pop ecx
push edi
push ebx
mov byte [ebp - 1], 1
call sub.MSVCRT.dll_strcpy
cmp dword [0x40b690], 1
pop ecx
pop ecx
jne 0x402e2c
mov esi, dword [sym.imp.MSVCRT.dll_printf]
push str._I4DRIVER__key_value_found_n
call esi
push dword [ebp - 0x24]
push 0x408a74
call esi
add esp, 0xc
jmp 0x402e2c
push str.Out_of_memory_error_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 1], 0
jne 0x402ec9
mov esi, dword [sym.imp.MSVCRT.dll_printf]
cmp dword [0x40b690], 1
jne 0x402e56
push str.Listing_all_transports_n
call esi
pop ecx
lea eax, [ebp - 0x178]
push eax
push ebx
call sub.MSVCRT.dll_strcpy
mov eax, dword [ebp - 0x10]
pop ecx
cmp eax, dword [ebp - 8]
pop ecx
jle 0x402e70
mov dword [ebp - 8], eax
cmp dword [0x40b690], 1
jne 0x402e85
push dword [ebp - 8]
push str.Number_of_network_cards:__d_n
call esi
pop ecx
pop ecx
lea eax, [ebp - 0x1c]
push 1
push eax
push ebx
push dword [ebp - 0x20]
call fcn.004025d8
add esp, 0x10
test al, al
jne 0x402f56
dec dword [0x40b470]
jne 0x402eb0
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x40b690], 1
jne 0x4030ba
push str.Invalid_Network_Driver_n
call esi
jmp 0x4030b9
lea eax, [ebp - 0x1c]
push 1
push eax
push ebx
push dword [ebp - 0x20]
call fcn.004025d8
add esp, 0x10
cmp dword [ebp - 8], 1
mov byte [ebp - 4], al
jne 0x402f10
test al, al
jne 0x402f10
cmp dword [0x40b690], 1
jne 0x402efd
push str.Invalid_Driver_Name_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
and byte [ebp - 2], 0
lea eax, [ebp - 0x178]
push eax
push ebx
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov esi, dword [sym.imp.MSVCRT.dll_printf]
xor edi, edi
cmp byte [ebp - 1], 0
je 0x402e85
cmp byte [ebp - 2], 0
je 0x402e85
cmp byte [ebp - 4], 0
jne 0x402f58
jmp 0x402e9f
mov eax, dword [ebp - 0x10]
cmp dword [0x40b690], 1
mov dword [ebp - 8], eax
jne 0x402e85
push eax
push str.Number_of_network_cards:__d_n
call esi
pop ecx
pop ecx
jmp 0x402f18
xor edi, edi
dec dword [0x40b470]
jne 0x402f69
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x38]
xor esi, esi
mov dword [ebp - 0x10], eax
movzx eax, byte [ebp + esi - 0x1c]
push eax
push str._02x
push dword [ebp - 0x10]
call edi
add dword [ebp - 0x10], 2
add esp, 0xc
inc esi
cmp esi, 6
jl 0x402f77
mov cl, byte [ebp - 0x1a]
mov al, byte [ebp - 0x1b]
xor cl, byte [ebp - 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
xor al, cl
and al, 0x7f
movzx ecx, al
mov byte [ebp - 0x1a], al
movzx eax, byte [ebp - 0x19]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x18]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 0x17]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp + 8]
cmp byte [ebp - 1], 0
mov dword [eax], ecx
mov word [eax + 4], 0x1a
mov dword [eax + 8], 0xa
je 0x402fec
cmp byte [ebp - 2], 0
je 0x402fec
cmp byte [ebp - 3], 0
je 0x40304a
lea eax, [ebp - 0xc]
push eax
push str.SOFTWAREIBMLicense_Use_Runtime
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40304a
cmp byte [0x40c280], al
je 0x403016
inc eax
cmp byte [eax + 0x40c280], 0
jne 0x40300c
push dword [ebp - 8]
lea eax, [eax + 0x40c281]
push 0x40905c
push eax
call edi
add esp, 0xc
push 0x100
push ebx
xor ebx, ebx
push 3
push ebx
push str.I4DRIVER
push dword [ebp - 0xc]
call esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40304c
xor ebx, ebx
lea eax, [ebp - 0xc]
push eax
push str.SOFTWAREGradientDCEConfiguration
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x403093
push ebx
push ebx
push ebx
mov edi, str.HARDWARE_ADDRESS
push ebx
push edi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40308a
lea eax, [ebp - 0x38]
push 0xc
push eax
push 1
push ebx
push edi
push dword [ebp - 0xc]
call esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x24], ebx
je 0x4030a2
push dword [ebp - 0x24]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
xor eax, eax
jmp 0x4030bd
cmp dword [0x40b690], 1
jne 0x4030ba
push 0xffffffffffffffff
push str.Unable_to_open_VxD__Invalid_handle:__ld_n
call esi
pop ecx
pop ecx
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret