Function at 0x440210
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x471050]
xor eax, ebp
mov dword [ebp - 0x20], eax
cmp dword [ebp + 8], 0
je 0x44022f
cmp dword [ebp + 0xc], 0
jne 0x440239
mov eax, 0x80070057
jmp 0x4404b0
mov dword [ebp - 8], 0x80004005
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 4], 0
je 0x440490
cmp dword [ebp - 0xc], 0
je 0x440490
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp + 0x10], 2
jne 0x4402ba
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x18]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push 0x45a5f8
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x14], eax
jmp 0x4402e2
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x18]
push edx
push 0
push 0x20006
push 0
push 0
push 0
push 0x45a6d0
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
push eax
call fcn.00442200
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jl 0x44047c
mov ecx, dword [0x45c004]
mov dword [ebp - 0x130], ecx
mov edx, dword [0x45c008]
mov dword [ebp - 0x12c], edx
mov eax, dword [0x45c00c]
mov dword [ebp - 0x128], eax
mov ecx, dword [0x45c010]
mov dword [ebp - 0x124], ecx
lea edx, [ebp - 0x130]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00440d20
add esp, 8
push 0x45c004
lea ecx, [ebp - 0x130]
push ecx
call fcn.004421c0
add esp, 8
test eax, eax
je 0x440364
lea edx, [ebp - 0x130]
push edx
call fcn.00440a60
add esp, 4
xor eax, eax
mov word [ebp - 0x120], ax
push 0xfe
push 0
lea ecx, [ebp - 0x11e]
push ecx
call fcn.0042e870
add esp, 0xc
push 0x80
lea edx, [ebp - 0x120]
push edx
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
je 0x440472
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x1c]
push edx
push 0
push 0x20006
push 0
push 0
push 0
lea eax, [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
call fcn.00442200
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jl 0x440472
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x134], 0
lea eax, [ebp - 0x138]
push eax
push 0x104
mov ecx, dword [ebp + 8]
push ecx
call fcn.00442240
lea edx, [ebp - 0x134]
push edx
push 0x104
mov eax, dword [ebp + 0xc]
push eax
call fcn.00442240
mov ecx, dword [ebp - 0x138]
lea edx, [ecx + ecx + 2]
push edx
mov eax, dword [ebp + 8]
push eax
push 1
push 0
push 0x45a6b4
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebp - 0x134]
lea eax, [edx + edx + 2]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 1
push 0
push str.GameInstallPath
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 8], 0
jl 0x4404ad
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00441e70
add esp, 0xc
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.0042c9e9
mov esp, ebp
pop ebp
ret