Function at 0x40ad90
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x318]
sub esp, 0x398
mov eax, dword [0x4a86f0]
xor eax, ebp
mov dword [ebp + 0x314], eax
mov eax, dword [ebp + 0x328]
push ebx
push esi
mov esi, dword [ebp + 0x320]
push edi
mov edi, dword [ebp + 0x324]
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x74], eax
mov ebx, 0xffffffec
test eax, eax
je 0x40add5
mov dword [eax], 0
call fcn.0040eb10
test eax, eax
jne 0x40adeb
call fcn.0040ea00
test eax, eax
jne 0x40afd8
test edi, edi
je 0x40afd1
cmp word [edi], 0
je 0x40afd1
mov eax, dword [ebp + 0x32c]
push eax
push edi
push esi
call fcn.00409d90
lea ecx, [ebp + 0x194]
push ecx
push str.VPh_sCF
push esi
call fcn.0040a400
add esp, 0x18
test eax, eax
jne 0x40afda
lea edx, [ebp + 0x194]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jle 0x40ae44
xor eax, eax
jmp 0x40ae5e
lea eax, [esi + esi]
call fcn.0046db50
mov eax, esp
push 0
push esi
lea ecx, [ebp + 0x194]
push ecx
push eax
call fcn.00434c30
push eax
push str.090746F9_9F39_42C0_920A_4852C2EDE704
push str.SOFTWAREClassesCLSID_
lea edx, [ebp - 0x6c]
push 0x4a05bc
push edx
call fcn.0046978b
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x70]
push ecx
push 0x20006
push 0
lea edx, [ebp - 0x6c]
push edx
push closesocket
call fcn.0040f070
add esp, 0x2c
test eax, eax
jne 0x40afda
push eax
push str.090746F9_9F39_42C0_920A_4852C2EDE704
push closesocket
push str.WriteAPSerial
call fcn.0040cbe0
mov eax, edi
add esp, 0x10
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40aec0
sub eax, edx
sar eax, 1
inc eax
push eax
mov dword [ebp - 0x7c], eax
call fcn.00413ab0
mov edi, eax
lea eax, [edi + 8]
add esp, 4
cmp eax, 0x400
ja 0x40aefb
call fcn.0046db50
mov eax, esp
test eax, eax
je 0x40af11
mov dword [eax], 0xcccc
jmp 0x40af0e
push eax
call fcn.0046a57b
add esp, 4
test eax, eax
je 0x40af11
mov dword [eax], 0xdddd
add eax, 8
mov ebx, eax
test ebx, ebx
je 0x40afb5
mov eax, dword [ebp - 0x78]
lea edx, [ebp + 0x294]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40af26
lea eax, [ebp + 0x294]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40af4e
xor esi, esi
jmp 0x40af6c
lea esi, [eax + eax]
mov eax, esi
call fcn.0046db50
mov eax, esp
push 0
push esi
lea ecx, [ebp + 0x294]
push ecx
push eax
call fcn.0044f9b0
mov esi, eax
mov edx, dword [ebp - 0x7c]
push edx
push edi
push 0
push ebx
call fcn.0046a330
add esp, 0xc
push eax
push esi
call fcn.00413e50
mov esi, eax
add esp, 0xc
test esi, esi
jbe 0x40afae
mov eax, dword [ebp - 0x70]
push edi
push ebx
push 1
push 0
push str.GlobalS
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x40afba
mov dword [eax], esi
jmp 0x40afba
mov edi, 0x1770
jmp 0x40afba
mov edi, 8
push ebx
call fcn.00434310
mov ecx, dword [ebp - 0x70]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x40afda
mov eax, 0x57
jmp 0x40afda
mov eax, ebx
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x314]
xor ecx, ebp
call fcn.0046984a
add ebp, 0x318
mov esp, ebp
pop ebp
ret