Function at 0x4039f9
Capabilities:
Check os version
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c8
push esi
push edi
xor eax, eax
push 6
push eax
push 0x40b478
mov dword [ebp - 4], eax
mov byte [ebp - 8], al
mov byte [ebp - 5], 1
mov byte [ebp - 6], al
mov byte [ebp - 7], al
mov dword [ebp - 0x14], eax
call sub.MSVCRT.dll_memset
mov edi, 0x200
lea eax, [ebp - 0x4c8]
push edi
push 0
push eax
call sub.MSVCRT.dll_memset
push edi
lea eax, [ebp - 0x6c8]
push 0
push eax
call sub.MSVCRT.dll_memset
push 0x100
lea eax, [ebp - 0x2c8]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x30
cmp dword [ebp + 8], 0
je 0x404185
mov esi, dword [0x40b690]
and dword [0x40b690], 0
lea eax, [ebp - 0x4c8]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00403650
push 0xc
push 0
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov dword [0x40b690], esi
call sub.MSVCRT.dll_memset
add esp, 0x14
lea eax, [ebp - 0xc8]
mov dword [ebp - 0xc8], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x403ad0
cmp dword [0x40b690], 1
jne 0x404185
push str.Unable_to_obtain_NT_OS_Level._n
jmp 0x40417e
cmp dword [ebp - 0xc4], 3
jbe 0x404170
cmp byte [0x40b688], 0
jne 0x403f3f
cmp dword [0x40b690], 1
jne 0x403aff
push str.Driver_not_provided_by_the_user_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
lea eax, [ebp - 0x18]
push eax
push str.SOFTWAREIBMLicense_Use_Runtime
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
mov esi, 0x40b480
jne 0x403e8f
cmp dword [0x40b690], 1
jne 0x403b35
push str._SOFTWAREIBMLicense_Use_Runtime__key_created_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push 0
push eax
push 0
push str.I4DRIVER
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403cfb
cmp dword [0x40b690], 1
jne 0x403b6c
push str._I4DRIVER__key_found_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push dword [ebp - 0x20]
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [ebp - 4], eax
je 0x403cef
push dword [ebp - 0x20]
push 0
push eax
call sub.MSVCRT.dll_memset
push edi
push 0
push esi
call sub.MSVCRT.dll_memset
add esp, 0x18
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push dword [ebp - 4]
push eax
push 0
push str.I4DRIVER
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403cfb
cmp dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
jbe 0x403c23
mov ecx, dword [ebp - 4]
cmp word [ecx + eax*2], 0x23
je 0x403bd6
inc eax
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
jb 0x403bc3
cmp eax, dword [ebp - 0x20]
jae 0x403c23
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
lea eax, [eax + ecx*2 + 2]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
cmp dword [0x40b690], 1
pop ecx
mov dword [ebp - 0x14], eax
jne 0x403c07
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 - 4]
mov ecx, dword [ebp - 0x1c]
and word [eax + ecx*2], 0
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
jle 0x403c44
mov byte [ebp - 6], 1
mov dword [ebp - 0x14], eax
jmp 0x403c44
mov eax, dword [ebp - 0xc]
cmp dword [0x40b690], 1
mov byte [ebp - 6], 1
mov dword [ebp - 0x14], eax
jne 0x403c44
push eax
push str.Number_of_network_cards:__d_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
pop ecx
cmp dword [ebp - 0xc4], 5
jb 0x403ca3
push 0x100
lea eax, [ebp - 0x1c8]
push dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll_wcstombs]
mov cl, byte [ebp - 0x1c8]
add esp, 0xc
xor eax, eax
jmp 0x403c7c
cmp cl, 0x7b
je 0x403c80
mov cl, byte [ebp + eax - 0x1c7]
inc eax
test cl, cl
jne 0x403c6f
cmp byte [ebp + eax - 0x1c8], 0
jne 0x403ca3
and byte [ebp - 5], 0
cmp dword [0x40b690], 1
jne 0x403ca3
push str.Device_name_not_in_W2K_format_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push edi
push 0
push esi
mov byte [ebp - 8], 1
call sub.MSVCRT.dll_memset
push dword [ebp - 4]
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 0x14
cmp dword [0x40b690], 1
jne 0x403cfb
push str._I4DRIVER__key_value_found._Driver_is:_n
call dword [sym.imp.MSVCRT.dll_printf]
push dword [ebp - 4]
push 0x4095a0
call dword [sym.imp.MSVCRT.dll_wprintf]
push 0x40959c
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
jmp 0x403cfb
push str.Out_of_memory_error._n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 8], 0
je 0x403e8f
cmp byte [ebp - 5], 0
je 0x403e8f
push 0x100
lea eax, [ebp - 0x2c8]
push dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll_wcstombs]
lea eax, [ebp - 0x2c4]
push eax
call fcn.0040445f
add esp, 0x10
test eax, eax
je 0x403d66
cmp dword [0x40b690], 1
jne 0x403e64
lea eax, [ebp - 0x2c4]
push eax
push str._______NetworkCard:__s_is_not_physical_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
pop ecx
jmp 0x403e64
cmp dword [0x40b690], 1
jne 0x403d89
push esi
push str.CreateFileW__s_n
call dword [sym.imp.MSVCRT.dll_wprintf]
push 0x40959c
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
push 0xffffffffffffffff
push 0
push 3
push 0
push 3
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0xc], edi
je 0x403db9
push 0
push 0
push edi
call fcn.00403235
add esp, 0xc
mov byte [ebp - 7], al
xor eax, eax
inc eax
cmp dword [ebp - 0x14], eax
jne 0x403e1e
cmp byte [ebp - 7], 0
jne 0x403e7c
cmp dword [0x40b690], eax
jne 0x403ddf
push str.Invalid_Driver_Name_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
and byte [ebp - 5], 0
lea eax, [ebp - 0x4c8]
push eax
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
pop ecx
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403eed
cmp dword [0x40b690], 1
jne 0x404185
push 0xffffffffffffffff
push str.Invalid_Handle_Value__ld_n
call dword [sym.imp.MSVCRT.dll_printf]
jmp 0x40416d
cmp byte [ebp - 7], 0
jne 0x403e7c
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
jne 0x403e48
cmp dword [0x40b690], eax
jne 0x403e5f
push 0xffffffffffffffff
push str.Invalid_Handle_Value__ld_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
pop ecx
jmp 0x403e5f
cmp dword [0x40b690], eax
jne 0x403e5c
push str.Invalid_Network_Card_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push edi
call esi
push dword [ebp - 0x10]
call esi
cmp dword [ebp - 4], 0
je 0x404185
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x404184
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x10]
call edi
jmp 0x403fe5
cmp dword [0x40b690], 1
jne 0x403eac
lea eax, [ebp - 0x4c8]
push eax
push str.I4DRIVER_entry_is_not_valid._Using__s_n
call dword [sym.imp.MSVCRT.dll_wprintf]
pop ecx
pop ecx
push edi
push 0
push esi
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x4c8]
push eax
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [ebp - 0x14]
add esp, 0x14
cmp dword [ebp - 0xc], eax
jle 0x403ed4
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
cmp dword [0x40b690], 1
jne 0x403eed
push dword [ebp - 0x14]
push str.Number_of_network_cards:__d_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
pop ecx
cmp dword [ebp - 4], 0
je 0x403efd
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
cmp dword [ebp - 0x10], 0xffffffff
je 0x403dff
push 0
push 0
push dword [ebp - 0x10]
call fcn.00403235
add esp, 0xc
test al, al
jne 0x403f37
cmp dword [0x40b690], 1
jne 0x403f2f
push str.Network_Card_discarded_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push dword [ebp - 0x10]
jmp 0x403fd1
push dword [ebp - 0x10]
jmp 0x403fdf
cmp dword [0x40b690], 1
mov esi, 0x40b480
jne 0x403f5b
push esi
push str.CreateFileW__s_n
call dword [sym.imp.MSVCRT.dll_wprintf]
pop ecx
pop ecx
mov eax, dword [ebp - 0xc]
cmp dword [0x40b690], 1
mov edi, dword [sym.imp.MSVCRT.dll_printf]
mov dword [ebp - 0x14], eax
jne 0x403f7a
push eax
push str.Number_of_network_cards:__d_n
call edi
pop ecx
pop ecx
push 0xffffffffffffffff
push 0
push 3
push 0
push 3
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], 0xffffffff
je 0x40415b
push 0
push 0
push dword [ebp - 0xc]
call fcn.00403235
add esp, 0xc
test al, al
jne 0x403fdc
cmp dword [0x40b690], 1
jne 0x403fce
push str.Network_Card_discarded_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404185
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x34]
xor edi, edi
mov dword [ebp - 0x1c], eax
movzx eax, byte [edi + 0x40b478]
push eax
push str._02x
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCRT.dll_sprintf]
add dword [ebp - 0x1c], 2
add esp, 0xc
inc edi
cmp edi, 6
jl 0x403fed
mov cl, byte [0x40b47a]
mov al, byte [0x40b479]
xor cl, byte [0x40b478]
xor al, cl
and al, 0x7f
movzx ecx, al
mov byte [0x40b47a], al
movzx eax, byte [0x40b47b]
shl ecx, 8
or ecx, eax
movzx eax, byte [0x40b47c]
shl ecx, 8
or ecx, eax
movzx eax, byte [0x40b47d]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov word [eax + 4], 0x1a
mov dword [eax + 8], 0xa
xor al, al
cmp byte [ebp - 8], al
je 0x404078
cmp byte [ebp - 5], al
je 0x404078
cmp byte [ebp - 6], al
je 0x4040fb
lea eax, [ebp - 0x18]
push eax
push str.SOFTWAREIBMLicense_Use_Runtime
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4040fb
cmp word [0x40b480], ax
je 0x4040a5
inc eax
cmp word [eax*2 + 0x40b480], 0
jne 0x404099
lea edi, [eax + eax]
lea eax, [ebp - 0x6c8]
push 0xa
push eax
push dword [ebp - 0x14]
mov word [edi + 0x40b482], 0x23
call dword [sym.imp.MSVCRT.dll__itow]
lea eax, [ebp - 0x6c8]
push eax
lea eax, [edi + 0x40b484]
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 0x14
push 0x100
push esi
push 3
push 0
push str.I4DRIVER
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x18]
push eax
push str.SOFTWAREGradientDCEConfiguration
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x404147
push eax
push eax
push eax
mov esi, str.HARDWARE_ADDRESS
push eax
push esi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40413e
lea eax, [ebp - 0x34]
push 0xc
push eax
push 1
push 0
push esi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
je 0x404157
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
xor eax, eax
jmp 0x404188
cmp dword [0x40b690], 1
jne 0x404185
push 0xffffffffffffffff
push str.Invalid_Handle_Value__ld_n
call edi
pop ecx
jmp 0x404184
cmp dword [0x40b690], 1
jne 0x404185
push str.Invalid_OS_Level._NT_4.0_is_a_prerequisite._n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
xor eax, eax
inc eax
pop edi
pop esi
leave
ret