Function at 0x402830
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov ebx, eax
lea eax, [ebp - 0xc]
push eax
push 0x2001f
push 0
push str.Software_baiduBaiduBrowserupdateinfo
push 0x80000001
mov esi, ecx
mov dword [ebp - 0x14], 0x80004005
mov dword [ebp - 0xc], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40286e
cmp dword [ebp - 0xc], eax
jne 0x40289b
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0
push 0x2001f
push 0
push 0
push 0
push str.Software_baiduBaiduBrowserupdateinfo
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x402ad8
mov eax, dword [0x4ae214]
mov edx, dword [eax + 0xc]
push edi
mov ecx, 0x4ae214
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 4], edi
test esi, esi
je 0x4028db
test esi, 0xffff0000
jne 0x4028df
movzx esi, si
push 0
push esi
call fcn.0040b110
add esp, 8
test eax, eax
je 0x402900
push esi
push eax
lea ecx, [ebp - 4]
call fcn.00406e10
jmp 0x4028fd
xor eax, eax
jmp 0x4028f3
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4028e4
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp - 4]
call fcn.004069f0
mov edi, dword [ebp - 4]
mov eax, dword [0x4ae214]
mov edx, dword [eax + 0xc]
mov ecx, 0x4ae214
call edx
add eax, 0x10
mov dword [ebp - 8], eax
test ebx, ebx
je 0x40293f
test ebx, 0xffff0000
jne 0x402943
movzx esi, bx
push 0
push esi
call fcn.0040b110
add esp, 8
test eax, eax
je 0x402969
push esi
push eax
lea ecx, [ebp - 8]
call fcn.00406e10
jmp 0x402969
xor eax, eax
jmp 0x40295f
mov eax, ebx
lea edx, [eax + 2]
jmp 0x402950
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402950
sub eax, edx
sar eax, 1
push eax
push ebx
lea ecx, [ebp - 8]
call fcn.004069f0
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test edi, edi
jne 0x40297c
mov dword [ebp - 0x10], 0
jmp 0x4029e1
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call ebx
mov esi, eax
test esi, esi
jg 0x40299f
mov dword [ebp - 0x10], 0
jmp 0x4029e1
lea eax, [esi + 1]
push 0x4af710
push eax
call fcn.00492916
mov ecx, dword [ebp - 4]
add esp, 8
push 0
push 0
push esi
mov edi, eax
push edi
push 0xffffffffffffffff
push ecx
push 0
push 0xfde9
call ebx
test eax, eax
jne 0x4029de
push edi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [ebp - 0x10], 0
jmp 0x4029e1
mov dword [ebp - 0x10], edi
mov eax, dword [ebp - 8]
test eax, eax
je 0x402a38
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call ebx
mov esi, eax
test esi, esi
jle 0x402a38
lea edx, [esi + 1]
push 0x4af710
push edx
call fcn.00492916
add esp, 8
push 0
push 0
push esi
mov edi, eax
mov eax, dword [ebp - 8]
push edi
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call ebx
test eax, eax
jne 0x402a3a
push edi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
xor edi, edi
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402a40
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
sub eax, edx
push eax
push edi
push 1
push 0
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x402a76
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, reloc.NETAPI32.dll_NetApiBufferFree
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x402aac
test esi, esi
je 0x402a84
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
test edi, edi
je 0x402a92
push edi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
mov dword [ebp - 0x14], 0
lea ecx, [eax + 0xc]
or edx, reloc.NETAPI32.dll_NetApiBufferFree
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402ab8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
or edx, reloc.NETAPI32.dll_NetApiBufferFree
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402ad7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop edi
mov eax, dword [ebp - 0xc]
pop esi
pop ebx
test eax, eax
je 0x402ae8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret