Function at 0x40c350
Capabilities:
Persist via run registry key
Query environment variable
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52e045
mov eax, dword fs:[0]
push eax
sub esp, 0x494
mov eax, dword [0x58e188]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x488], ebx
mov dword [ebp - 0x484], ebx
mov dword [ebp - 0x480], ebx
mov eax, dword [0x58f984]
mov eax, dword [eax - 0xc]
dec eax
push eax
lea ecx, [ebp - 0x478]
push ecx
mov ecx, 0x58f984
mov dword [ebp - 4], ebx
call fcn.004067f0
mov edx, dword [ebp - 0x478]
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edx
push str.GamePath
mov byte [ebp - 4], 1
call esi
push str.System32
push ecx
mov ecx, esp
mov dword [ebp - 0x47c], esp
push str._SystemRoot_
call fcn.00402730
lea eax, [ebp - 0x470]
push eax
call fcn.00406240
add esp, 8
push eax
lea ecx, [ebp - 0x474]
push ecx
mov byte [ebp - 4], 2
call fcn.00404620
mov eax, dword [eax]
add esp, 0xc
push eax
push 0x53ebf4
call esi
mov eax, dword [ebp - 0x474]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c42f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x470]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c455
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x2001f
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push SysReAllocString
lea ecx, [ebp - 0x488]
call fcn.00405a20
cmp eax, ebx
jne 0x40c60e
call fcn.0041b722
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40c491
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x464], esi
mov byte [ebp - 4], 3
call fcn.0041b722
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40c4c1
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x45c], edi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x12c
or eax, ecx
mov byte [ebp - 4], 4
mov dword [ebp - 0x460], 0x12c
jge 0x40c50b
push 0x12c
lea ecx, [ebp - 0x464]
call fcn.00401fa0
mov esi, dword [ebp - 0x464]
lea ecx, [ebp - 0x460]
push ecx
push esi
push str.Personal
lea ecx, [ebp - 0x488]
call fcn.00405ad0
mov eax, dword [ebp - 0x488]
cmp eax, ebx
je 0x40c53a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x488], ebx
mov ebx, dword [ebp - 0x460]
mov dword [ebp - 0x484], 0
test ebx, ebx
jns 0x40c558
push 0x80070057
call fcn.00401040
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, ebx
or eax, ecx
jge 0x40c57b
push ebx
lea ecx, [ebp - 0x45c]
call fcn.00401fa0
mov edi, dword [ebp - 0x45c]
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
push str.MYDOC
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00516005
add esp, 8
test eax, eax
js 0x40c54e
cmp eax, dword [esi - 8]
jg 0x40c54e
mov dword [esi - 0xc], eax
xor edx, edx
mov word [esi + eax*2], dx
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00516005
add esp, 8
test eax, eax
js 0x40c54e
cmp eax, dword [edi - 8]
jg 0x40c54e
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
add edi, 0xfffffff0
mov byte [ebp - 4], 3
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40c5ee
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add esi, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c60e
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
push str.Microsoft_Windows_7_x64
push 0x58f9d4
call fcn.00402630
add esp, 8
test al, al
je 0x40c639
lea eax, [ebp - 0x46c]
push eax
push 0x20019
push 0
push str.SOFTWAREWow6432NodeGoyooi8deskgidinfo
jmp 0x40c64c
lea ecx, [ebp - 0x46c]
push ecx
push 0x20019
push 0
push str.SOFTWAREGoyooi8deskgidinfo
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
xor esi, esi
cmp edi, esi
jne 0x40cd41
mov dword [ebp - 0x464], esi
mov dword [ebp - 0x474], esi
mov dword [ebp - 0x460], 0x20
mov dword [ebp - 0x45c], 0x400
call fcn.0041b722
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x40c69d
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x458], ebx
mov byte [ebp - 4], 5
call fcn.0041b722
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x40c6cd
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x470], esi
mov byte [ebp - 4], 6
call fcn.0041b722
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40c6fd
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x468], edi
mov byte [ebp - 4], 7
call fcn.0041b722
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40c72d
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x454], eax
lea ecx, [ebp - 0x45c]
push ecx
lea edx, [ebp - 0x450]
push edx
lea eax, [ebp - 0x474]
push eax
mov eax, dword [ebp - 0x46c]
push 0
lea ecx, [ebp - 0x460]
push ecx
lea edx, [ebp - 0x50]
push edx
push 0
push eax
mov byte [ebp - 4], 8
mov dword [ebp - 0x460], 0x20
mov dword [ebp - 0x45c], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x40cca2
lea ecx, [ebp - 0x450]
push ecx
lea edx, [ebp - 0x458]
push 0x53ec1c
push edx
call fcn.00402570
mov ebx, dword [ebp - 0x458]
mov esi, dword [ebx - 0xc]
add esp, 0xc
test esi, esi
js 0x40c54e
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, esi
or eax, ecx
jge 0x40c7df
push esi
lea ecx, [ebp - 0x458]
call fcn.00401fa0
mov ebx, dword [ebp - 0x458]
lea eax, [esi + 1]
push eax
push ebx
call fcn.00515fee
add esp, 8
cmp esi, dword [ebx - 8]
jg 0x40c54e
xor ecx, ecx
mov dword [ebx - 0xc], esi
mov word [ebx + esi*2], cx
cmp dword [ebx - 0xc], ecx
jl 0x40c8cc
push 0x53f61c
push ebx
call fcn.00515deb
add esp, 8
test eax, eax
je 0x40c8cc
sub eax, ebx
sar eax, 1
js 0x40c8cc
push 1
add eax, 5
push eax
lea edx, [ebp - 0x49c]
push edx
lea ecx, [ebp - 0x458]
call fcn.004066c0
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
mov byte [ebp - 4], 9
cmp eax, esi
je 0x40c8a6
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40c890
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40c890
push eax
call fcn.00402000
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40c87f
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x468], ebx
mov ebx, dword [ebp - 0x458]
jmp 0x40c8a0
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x468]
call fcn.00402320
mov edi, dword [ebp - 0x468]
mov eax, dword [ebp - 0x49c]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c8cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, 0x53f618
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40c8f9
test dx, dx
je 0x40c8f5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40c8f9
add eax, 4
add ecx, 4
test dx, dx
jne 0x40c8d3
xor eax, eax
jmp 0x40c8fe
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x40c998
cmp dword [ebx - 0xc], 0
jl 0x40c998
push 0x53f600
push ebx
call fcn.00515deb
add esp, 8
test eax, eax
je 0x40c998
sub eax, ebx
sar eax, 1
mov ecx, eax
js 0x40c998
mov eax, dword [ebx - 0xc]
sub eax, ecx
sub eax, 0xa
push eax
lea ecx, [ebp - 0x498]
push ecx
lea ecx, [ebp - 0x458]
call fcn.00406770
push eax
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 0xa
call fcn.004024c0
mov eax, dword [ebp - 0x498]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c980
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x454]
mov eax, dword [ecx - 0xc]
push 1
dec eax
push eax
lea ecx, [ebp - 0x454]
call fcn.00405cc0
mov ecx, 0x53f5fc
mov eax, edi
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40c9c6
test dx, dx
je 0x40c9c2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40c9c6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40c9a0
xor eax, eax
jmp 0x40c9cb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x40cb51
cmp dword [ebx - 0xc], 0
jl 0x40cb51
push 0x53f5e4
push ebx
call fcn.00515deb
add esp, 8
test eax, eax
je 0x40cb51
sub eax, ebx
sar eax, 1
mov ecx, eax
js 0x40cb51
mov eax, dword [ebx - 0xc]
sub eax, ecx
sub eax, 0xb
push eax
lea edx, [ebp - 0x48c]
push edx
lea ecx, [ebp - 0x458]
call fcn.00406770
push eax
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 0xb
call fcn.004024c0
mov eax, dword [ebp - 0x48c]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ca55
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x454]
cmp dword [ecx - 0xc], 0
jl 0x40cb51
mov edx, ecx
push 0x53ec78
push edx
call fcn.00515deb
add esp, 8
test eax, eax
je 0x40cb51
sub eax, dword [ebp - 0x454]
sar eax, 1
js 0x40cb51
push eax
lea eax, [ebp - 0x490]
push eax
lea ecx, [ebp - 0x454]
call fcn.004067f0
push eax
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 0xc
call fcn.004024c0
mov eax, dword [ebp - 0x490]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cad4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x454]
mov eax, dword [ecx - 0xc]
push 1
dec eax
push eax
lea ecx, [ebp - 0x454]
call fcn.00405cc0
mov eax, dword [ebp - 0x454]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x4a0], esp
mov esi, esp
push eax
call fcn.00402000
lea edx, [ebp - 0x494]
add esp, 4
add eax, 0x10
push edx
mov dword [esi], eax
call fcn.004078b0
add esp, 8
push eax
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 0xd
call fcn.004024c0
mov eax, dword [ebp - 0x494]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cb51
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, 0x53f5e0
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40cb7e
test dx, dx
je 0x40cb7a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40cb7e
add eax, 4
add ecx, 4
test dx, dx
jne 0x40cb58
xor eax, eax
jmp 0x40cb83
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x40cc1d
cmp dword [ebx - 0xc], 0
jl 0x40cc1d
push 0x53f600
push ebx
call fcn.00515deb
add esp, 8
test eax, eax
je 0x40cc1d
sub eax, ebx
sar eax, 1
mov ecx, eax
js 0x40cc1d
mov eax, dword [ebx - 0xc]
sub eax, ecx
sub eax, 0xa
push eax
lea ecx, [ebp - 0x47c]
push ecx
lea ecx, [ebp - 0x458]
call fcn.00406770
push eax
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 0xe
call fcn.004024c0
mov eax, dword [ebp - 0x47c]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40cc05
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x454]
mov eax, dword [ecx - 0xc]
push 1
dec eax
push eax
lea ecx, [ebp - 0x454]
call fcn.00405cc0
lea edx, [ebp - 0x50]
push edx
lea eax, [ebp - 0x470]
push 0x53f5d4
push eax
call fcn.00402570
mov ecx, dword [ebp - 0x454]
mov esi, dword [ebp - 0x470]
add esp, 0xc
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [ebp - 0x464]
lea edx, [ebp - 0x45c]
push edx
lea ecx, [ebp - 0x450]
push ecx
lea edx, [ebp - 0x474]
push edx
push 0
lea ecx, [ebp - 0x460]
push ecx
inc eax
lea edx, [ebp - 0x50]
push edx
push eax
mov dword [ebp - 0x464], eax
mov eax, dword [ebp - 0x46c]
push eax
mov dword [ebp - 0x460], 0x20
mov dword [ebp - 0x45c], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x40c790
mov ecx, dword [ebp - 0x46c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x454]
mov edi, dword [ebp - 0x464]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ccdb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x468]
add eax, 0xfffffff0
mov byte [ebp - 4], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cd01
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov byte [ebp - 4], 5
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cd21
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cd41
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x478]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cd67
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x488]
test eax, eax
je 0x40cd78
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00514c0e
mov esp, ebp
pop ebp
ret