Function at 0x403df1
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 0x40c848
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 0x40457d
mov esi, dword [0x40ca60]
and dword [0x40ca60], 0
lea eax, [ebp - 0x4c8]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00403a48
push 0xc
push 0
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov dword [0x40ca60], 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 0x403ec8
cmp dword [0x40ca60], 1
jne 0x40457d
push str.Unable_to_obtain_NT_OS_Level._n
jmp 0x404576
cmp dword [ebp - 0xc4], 3
jbe 0x404568
cmp byte [0x40ca58], 0
jne 0x404337
cmp dword [0x40ca60], 1
jne 0x403ef7
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, 0x40c850
jne 0x404287
cmp dword [0x40ca60], 1
jne 0x403f2d
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 0x4040f3
cmp dword [0x40ca60], 1
jne 0x403f64
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 0x4040e7
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 0x4040f3
cmp dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
jbe 0x40401b
mov ecx, dword [ebp - 4]
cmp word [ecx + eax*2], 0x23
je 0x403fce
inc eax
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
jb 0x403fbb
cmp eax, dword [ebp - 0x20]
jae 0x40401b
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 [0x40ca60], 1
pop ecx
mov dword [ebp - 0x14], eax
jne 0x403fff
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 0x40403c
mov byte [ebp - 6], 1
mov dword [ebp - 0x14], eax
jmp 0x40403c
mov eax, dword [ebp - 0xc]
cmp dword [0x40ca60], 1
mov byte [ebp - 6], 1
mov dword [ebp - 0x14], eax
jne 0x40403c
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 0x40409b
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 0x404074
cmp cl, 0x7b
je 0x404078
mov cl, byte [ebp + eax - 0x1c7]
inc eax
test cl, cl
jne 0x404067
cmp byte [ebp + eax - 0x1c8], 0
jne 0x40409b
and byte [ebp - 5], 0
cmp dword [0x40ca60], 1
jne 0x40409b
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 [0x40ca60], 1
jne 0x4040f3
push str._I4DRIVER__key_value_found._Driver_is:_n
call dword [sym.imp.MSVCRT.dll_printf]
push dword [ebp - 4]
push 0x40b3dc
call dword [sym.imp.MSVCRT.dll_wprintf]
push 0x406d94
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
jmp 0x4040f3
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 0x404287
cmp byte [ebp - 5], 0
je 0x404287
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.00404857
add esp, 0x10
test eax, eax
je 0x40415e
cmp dword [0x40ca60], 1
jne 0x40425c
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 0x40425c
cmp dword [0x40ca60], 1
jne 0x404181
push esi
push str.CreateFileW__s_n
call dword [sym.imp.MSVCRT.dll_wprintf]
push 0x406d94
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 0x4041b1
push 0
push 0
push edi
call fcn.0040362d
add esp, 0xc
mov byte [ebp - 7], al
xor eax, eax
inc eax
cmp dword [ebp - 0x14], eax
jne 0x404216
cmp byte [ebp - 7], 0
jne 0x404274
cmp dword [0x40ca60], eax
jne 0x4041d7
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 0x4042e5
cmp dword [0x40ca60], 1
jne 0x40457d
push 0xffffffffffffffff
push str.Invalid_Handle_Value__ld_n
call dword [sym.imp.MSVCRT.dll_printf]
jmp 0x404565
cmp byte [ebp - 7], 0
jne 0x404274
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
jne 0x404240
cmp dword [0x40ca60], eax
jne 0x404257
push 0xffffffffffffffff
push str.Invalid_Handle_Value__ld_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
pop ecx
jmp 0x404257
cmp dword [0x40ca60], eax
jne 0x404254
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 0x40457d
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x40457c
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x10]
call edi
jmp 0x4043dd
cmp dword [0x40ca60], 1
jne 0x4042a4
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 0x4042cc
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
cmp dword [0x40ca60], 1
jne 0x4042e5
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 0x4042f5
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
cmp dword [ebp - 0x10], 0xffffffff
je 0x4041f7
push 0
push 0
push dword [ebp - 0x10]
call fcn.0040362d
add esp, 0xc
test al, al
jne 0x40432f
cmp dword [0x40ca60], 1
jne 0x404327
push str.Network_Card_discarded_n
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
push dword [ebp - 0x10]
jmp 0x4043c9
push dword [ebp - 0x10]
jmp 0x4043d7
cmp dword [0x40ca60], 1
mov esi, 0x40c850
jne 0x404353
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 [0x40ca60], 1
mov edi, dword [sym.imp.MSVCRT.dll_printf]
mov dword [ebp - 0x14], eax
jne 0x404372
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 0x404553
push 0
push 0
push dword [ebp - 0xc]
call fcn.0040362d
add esp, 0xc
test al, al
jne 0x4043d4
cmp dword [0x40ca60], 1
jne 0x4043c6
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 0x40457d
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 + 0x40c848]
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 0x4043e5
mov cl, byte [0x40c84a]
mov al, byte [0x40c849]
xor cl, byte [0x40c848]
xor al, cl
and al, 0x7f
movzx ecx, al
mov byte [0x40c84a], al
movzx eax, byte [0x40c84b]
shl ecx, 8
or ecx, eax
movzx eax, byte [0x40c84c]
shl ecx, 8
or ecx, eax
movzx eax, byte [0x40c84d]
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 0x404470
cmp byte [ebp - 5], al
je 0x404470
cmp byte [ebp - 6], al
je 0x4044f3
lea eax, [ebp - 0x18]
push eax
push str.SOFTWAREIBMLicense_Use_Runtime
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4044f3
cmp word [0x40c850], ax
je 0x40449d
inc eax
cmp word [eax*2 + 0x40c850], 0
jne 0x404491
lea edi, [eax + eax]
lea eax, [ebp - 0x6c8]
push 0xa
push eax
push dword [ebp - 0x14]
mov word [edi + 0x40c852], 0x23
call dword [sym.imp.MSVCRT.dll__itow]
lea eax, [ebp - 0x6c8]
push eax
lea eax, [edi + 0x40c854]
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 0x40453f
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 0x404536
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 0x40454f
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
xor eax, eax
jmp 0x404580
cmp dword [0x40ca60], 1
jne 0x40457d
push 0xffffffffffffffff
push str.Invalid_Handle_Value__ld_n
call edi
pop ecx
jmp 0x40457c
cmp dword [0x40ca60], 1
jne 0x40457d
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