Function at 0x40d690
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x478]
sub esp, 0x478
push 0xffffffffffffffff
push 0x475840
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x4a3eb0]
xor eax, ebp
mov dword [ebp + 0x474], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x484]
mov edx, dword [0x4a440c]
mov edi, dword [ebp + 0x488]
mov dword [ebp - 0x20], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4a440c
mov dword [ebp - 0x1c], edi
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0x480]
mov edx, dword [str.SOFTWARESamsungKiesDeviceDB]
push ecx
push edx
lea eax, [ebp - 0x14]
push 0x47fc28
push eax
mov dword [ebp - 4], 0
call fcn.00402e30
mov ebx, dword [ebp - 0x14]
add esp, 0x10
lea ecx, [ebp - 0x18]
push ecx
push 0x20006
push 0
push ebx
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
je 0x40d761
lea eax, [ebx - 0x10]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d75a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
jmp 0x40d897
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d766
sub eax, edx
sar eax, 1
mov ecx, eax
and ecx, 0xf
mov dword [ebp - 0x24], eax
jne 0x40d788
mov dword [ebp - 0x10], 0x10
jmp 0x40d792
mov edx, 0x10
sub edx, ecx
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 0x10]
lea esi, [ecx + eax]
push esi
call fcn.00465a98
push esi
mov edi, eax
call fcn.00465a98
mov edx, dword [ebp - 0x10]
push esi
push edx
push edi
mov ebx, eax
call sub.MSVCR90.dll_memset
push esi
push 0
push ebx
call sub.MSVCR90.dll_memset
mov eax, dword [ebp - 0x1c]
add esp, 0x20
test eax, eax
je 0x40d7f5
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40d7d9
xor eax, eax
jmp 0x40d7f5
add eax, eax
mov dword [ebp - 0x10], eax
call fcn.00473e60
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
mov eax, esp
push 3
push ecx
push edx
push eax
call fcn.0040d170
mov ecx, dword [ebp - 0x24]
push ecx
push eax
push edi
call sub.MSVCR90.dll_memcpy
add esp, 0xc
lea ecx, [ebp]
call fcn.00450590
push 0x10
push 0x10
push 0x47fc4c
push str.0b1e96db05d64ea4
lea ecx, [ebp]
mov byte [ebp - 4], 1
call fcn.004505b0
push 0
push esi
push ebx
push edi
lea ecx, [ebp]
call fcn.00451820
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
push esi
push ebx
push 3
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push edi
mov esi, eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
mov ecx, dword [ebp - 0x18]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp]
mov byte [ebp - 4], 0
call fcn.004505a0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test esi, esi
jne 0x40d74c
test ecx, ecx
jg 0x40d895
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
lea esp, [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x474]
xor ecx, ebp
call fcn.00473c8a
add ebp, 0x478
mov esp, ebp
pop ebp
ret