Function at 0x4024b0
Capabilities:
Check if file exists
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4121b1
mov eax, dword fs:[0]
push eax
sub esp, 0x284
mov eax, dword [0x41b068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004068e0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push eax
push str.TempestHallDirectory
push str.SoftwareTENCENTQQGameSYS
push 0x80000001
call dword [sym.imp.SHLWAPI.dll_SHRegGetPathW]
test eax, eax
jne 0x402a71
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402a71
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x26c]
mov dword [ebp - 0x26c], 0
push eax
push str.Environment
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x268]
push eax
push 0
lea eax, [ebp - 0x244]
mov dword [ebp - 0x244], 2
push eax
push 0
push str.Path
push dword [ebp - 0x26c]
call esi
test eax, eax
jne 0x402a71
mov eax, dword [ebp - 0x268]
xor ecx, ecx
mov edx, 2
xorps xmm0, xmm0
mul edx
movlpd qword [ebp - 0x24c], xmm0
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405a54
add esp, 4
lea ecx, [ebp - 0x24c]
push eax
call fcn.00404060
mov dword [ebp - 4], 0
push dword [ebp - 0x268]
mov edi, dword [ebp - 0x24c]
push 0
push edi
call fcn.004068e0
add esp, 0xc
lea eax, [ebp - 0x268]
push eax
push edi
lea eax, [ebp - 0x244]
push eax
push 0
push str.Path
push dword [ebp - 0x26c]
call esi
test eax, eax
jne 0x402a46
push edi
lea ecx, [ebp - 0x290]
call fcn.004010c0
lea esi, [ebp - 0x218]
mov ecx, eax
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x402624
sub esi, edx
mov edx, dword [ecx + 0x10]
sar esi, 1
cmp dword [ecx + 0x14], 8
jb 0x40263e
mov ecx, dword [ecx]
push esi
lea eax, [ebp - 0x218]
push eax
push 0
call fcn.00404180
add esp, 0xc
lea ecx, [ebp - 0x290]
mov esi, eax
call fcn.004016b0
cmp esi, 0xffffffff
jne 0x402a46
push edi
lea ecx, [ebp - 0x264]
call fcn.004010c0
push ecx
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x238], 0
xorps xmm0, xmm0
mov dword [ebp - 0x21c], 0x3b
push eax
lea ecx, [ebp - 0x264]
movq qword [ebp - 0x240], xmm0
call fcn.004012a0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x23c]
mov ecx, dword [ebp - 0x240]
sub eax, ecx
sar eax, 3
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x21c], 0
test eax, eax
je 0x4027e2
xor edx, edx
mov dword [ebp - 0x278], edx
sub esp, 0x18
lea edi, [ecx + edx]
mov esi, esp
mov dword [ebp - 0x270], esi
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
cmp dword [edi + 0x14], 8
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x274], eax
jb 0x402717
mov edi, dword [edi]
cmp eax, 8
jae 0x402729
movups xmm0, xmmword [edi]
mov eax, 7
movups xmmword [esi], xmm0
jmp 0x402771
or eax, 7
mov ecx, 0x7ffffffe
cmp eax, 0x7ffffffe
cmova eax, ecx
xor ecx, ecx
mov dword [ebp - 0x270], eax
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00404cd0
mov ecx, dword [ebp - 0x274]
mov dword [esi], eax
lea ecx, [ecx*2 + 2]
push ecx
push edi
push eax
call fcn.00406360
mov eax, dword [ebp - 0x270]
add esp, 0xc
mov ecx, dword [ebp - 0x274]
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], eax
call fcn.00402340
mov edx, dword [ebp - 0x278]
add esp, 0x18
test al, al
je 0x4027ad
mov eax, dword [ebp - 0x240]
add eax, edx
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x4027a1
mov ecx, dword [eax]
mov dword [eax + 0x10], 0
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x23c]
add edx, 0x18
mov ecx, dword [ebp - 0x240]
sub eax, ecx
mov esi, dword [ebp - 0x21c]
sar eax, 3
inc esi
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x21c], esi
mov dword [ebp - 0x278], edx
cmp esi, eax
jb 0x4026e4
mov dword [ebp - 0x234], 0
mov esi, 7
mov dword [ebp - 0x224], 0
xor eax, eax
mov dword [ebp - 0x220], esi
mov word [ebp - 0x234], ax
mov byte [ebp - 4], 4
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp - 0x23c]
sub eax, ecx
sar eax, 3
imul eax, eax, 0xaaaaaaab
test eax, eax
je 0x402947
xor edx, edx
mov dword [ebp - 0x274], edx
mov edi, dword [edx + ecx + 0x10]
add edx, ecx
test edi, edi
je 0x402912
cmp dword [edx + 0x14], 8
jb 0x40284b
mov edx, dword [edx]
mov ecx, dword [ebp - 0x224]
mov eax, esi
sub eax, ecx
mov dword [ebp - 0x270], ecx
cmp edi, eax
ja 0x40289d
cmp dword [ebp - 0x220], 8
lea eax, [ecx + edi]
lea esi, [ebp - 0x234]
mov dword [ebp - 0x224], eax
cmovae esi, dword [ebp - 0x234]
lea eax, [edi + edi]
push eax
push edx
lea ecx, [esi + ecx*2]
push ecx
call fcn.00406360
mov eax, dword [ebp - 0x270]
add esp, 0xc
add eax, edi
xor ecx, ecx
mov word [esi + eax*2], cx
jmp 0x4028b1
push edi
push edx
push dword [ebp - 0x270]
lea ecx, [ebp - 0x234]
push edi
call fcn.00404250
mov esi, dword [ebp - 0x220]
lea ecx, [ebp - 0x234]
mov edx, dword [ebp - 0x224]
mov eax, esi
sub eax, edx
cmp eax, 1
jb 0x4028f2
cmp esi, 8
lea eax, [edx + 1]
mov dword [ebp - 0x224], eax
cmovae ecx, dword [ebp - 0x234]
mov ax, word [0x418370]
mov word [ecx + edx*2], ax
xor eax, eax
mov word [ecx + edx*2 + 2], ax
jmp 0x402906
push 1
push 0x418370
push dword [ebp - 0x270]
push 1
call fcn.00404250
mov esi, dword [ebp - 0x220]
mov ecx, dword [ebp - 0x240]
mov eax, dword [ebp - 0x23c]
mov edi, dword [ebp - 0x21c]
sub eax, ecx
mov edx, dword [ebp - 0x274]
inc edi
sar eax, 3
add edx, 0x18
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x274], edx
cmp edi, eax
jb 0x402835
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x234]
call fcn.00403e60
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 0
cmovae eax, dword [ebp - 0x234]
push eax
push str.Path
push str.Environment
push 0x80000001
call dword [sym.imp.SHLWAPI.dll_SHRegSetPathW]
mov ecx, dword [ebp - 0x220]
cmp ecx, 8
jb 0x4029c5
mov edx, dword [ebp - 0x234]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4029bb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a8c
push ecx
push edx
call fcn.00405a11
add esp, 8
xor eax, eax
mov dword [ebp - 0x224], 0
lea ecx, [ebp - 0x240]
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
call fcn.00403cd0
mov ecx, dword [ebp - 0x250]
cmp ecx, 8
jb 0x402a29
mov edx, dword [ebp - 0x264]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402a1f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a8c
push ecx
push edx
call fcn.00405a11
add esp, 8
xor eax, eax
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x250], 7
mov word [ebp - 0x264], ax
mov edi, dword [ebp - 0x248]
test edi, edi
je 0x402a71
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x402a71
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x402a71
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004059e0
mov esp, ebp
pop ebp
ret
call fcn.00408a5f
int3