Function at 0x4e22d0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5389f4
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x59a0a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
xor ebx, ebx
mov dword [ebp - 4], edi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov byte [ebp - 4], 1
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4e2331
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e2346
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x4e234a
mov ecx, edx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 2
cmp dword [0x59fb10], 0
je 0x4e2387
mov ecx, dword [0x59facc]
cmp ecx, 0x18707
je 0x4e2387
mov eax, dword [0x59fb14]
cmp dword [eax - 0xc], 0
je 0x4e2387
push ecx
mov dword [0x59fae0], ecx
push str.Use_Game_SupplyId__d_
jmp 0x4e2689
mov eax, dword [0x59fb74]
cmp dword [eax - 0xc], 0
jne 0x4e23a3
push 0x1d
push 0x55dd04
lea ecx, [ebp - 0x10]
call fcn.00402d50
jmp 0x4e23b5
push eax
lea eax, [ebp - 0x10]
push 0x55dd40
push eax
call fcn.004023f0
add esp, 0xc
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x14]
push eax
push 0x2001f
push 0
push esi
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4e2424
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x18]
push eax
push 0x59fae0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x28], edi
push eax
push 0
push 0x55dd68
push edi
mov dword [ebp - 0x18], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4e2424
cmp dword [ebp - 0x14], 4
jne 0x4e2424
test edi, edi
je 0x4e2677
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call eax
jmp 0x4e2672
mov eax, dword [0x59facc]
mov dword [0x59fae0], eax
lea eax, [ebp - 0x14]
push eax
push 0x2001f
push 0
push esi
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4e2471
test edi, edi
je 0x4e245c
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call eax
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
test eax, eax
je 0x4e25e2
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0x2001f
push 0
push 0x55dd7c
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4e24a5
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
jmp 0x4e2547
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0x2001f
push 0
push 0x55dda0
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4e267e
test edi, edi
je 0x4e24da
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
test eax, eax
jne 0x4e267e
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x55ddb4
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x4e2526
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
test edi, edi
je 0x4e2536
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x28], edi
cmp dword [ebp - 0x18], 0
mov dword [ebp - 0x24], 0
jne 0x4e267e
mov eax, dword [0x59fb74]
cmp dword [eax - 0xc], 0
jne 0x4e2563
push 0xc
push 0x55ddc4
lea ecx, [ebp - 0x10]
call fcn.00402d50
jmp 0x4e2575
push eax
lea eax, [ebp - 0x10]
push 0x55dde0
push eax
call fcn.004023f0
add esp, 0xc
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4e25c1
mov dword [ebp - 0x14], eax
test edi, edi
je 0x4e25b4
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x14], eax
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
test ebx, ebx
je 0x4e25d1
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov dword [ebp - 0x34], ebx
cmp dword [ebp - 0x14], 0
mov dword [ebp - 0x30], 0
jne 0x4e267e
mov eax, dword [0x59facc]
push 4
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 4
push 0
push str.SupplyId
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x59fee8]
cmp eax, dword [ecx + 4]
jle 0x4e264f
push 0x59fee8
call fcn.0049af28
add esp, 4
cmp dword [0x59fee8], 0xffffffff
jne 0x4e264f
mov byte [ebp - 4], 3
call fcn.004e7150
push 0x53eaa0
call fcn.0049b282
push 0x59fee8
mov byte [ebp - 4], 2
call fcn.0049aee9
add esp, 8
push dword [0x59facc]
push str.Write_GameDownload_Inner_SupplyId__d__To_Reg
push 0x59feec
call fcn.004e76a0
add esp, 0xc
test edi, edi
je 0x4e2677
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
push dword [0x59fae0]
push str.SupplyId__d_
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0xc
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4e26cc
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e26ca
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4e26cc
call edx
test ebx, ebx
je 0x4e26db
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
jmp 0x4e26e1
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x4e26e8
push edi
call ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret