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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53c97e
mov eax, dword fs:[0]
push eax
sub esp, 0x688
mov eax, dword [0x59a0a0]
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
mov dword [ebp - 0x680], ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x694], 0
mov dword [ebp - 0x690], 0
mov dword [ebp - 0x68c], 0
mov byte [ebp - 4], 5
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x514819
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51482e
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514832
mov ecx, edx
call esi
lea ebx, [eax + 0x10]
mov dword [ebp - 0x688], ebx
mov byte [ebp - 4], 6
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x51485b
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514870
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514874
mov ecx, edx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x660], esi
mov byte [ebp - 4], 7
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x51489d
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov edi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5148b2
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x5148b6
mov ecx, edx
call edi
add eax, 0x10
mov dword [ebp - 0x670], eax
mov ecx, dword [ebp - 0x680]
mov byte [ebp - 4], 8
push 0xbb8
push 6
mov eax, dword [ecx]
mov dword [ecx + 0x400], 0xbb8
call dword [eax + 0x1c]
mov eax, dword [0x59fb74]
cmp dword [eax - 0xc], 0
jne 0x5148fe
push 0x20
push 0x56d368
lea ecx, [ebp - 0x670]
call fcn.00402d50
jmp 0x514913
push eax
lea eax, [ebp - 0x670]
push 0x56d4b4
push eax
call fcn.004023f0
add esp, 0xc
mov edi, dword [ebp - 0x670]
lea eax, [ebp - 0x658]
push eax
push 0x2001f
push 0
push edi
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x658], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x515c4a
mov eax, dword [ebp - 0x658]
push 0x208
mov dword [ebp - 0x694], eax
lea eax, [ebp - 0x218]
push 0
push eax
mov dword [ebp - 0x690], 0
call fcn.0049e130
add esp, 0xc
mov dword [ebp - 0x658], 0x208
lea eax, [ebp - 0x658]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x67c]
push eax
push 0
push 0x56c24c
push dword [ebp - 0x694]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x515c4a
mov eax, dword [ebp - 0x67c]
cmp eax, 1
je 0x5149bf
cmp eax, 2
jne 0x515c4a
mov eax, dword [ebp - 0x658]
test eax, eax
je 0x5149e3
test al, 1
jne 0x515c4a
shr eax, 1
cmp word [ebp + eax*2 - 0x21a], 0
je 0x5149ec
jmp 0x515c4a
xor eax, eax
mov word [ebp - 0x218], ax
push ecx
mov dword [ebp - 0x67c], esp
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x65c], esp
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x514a0d
call dword [eax + 0x10]
mov ecx, eax
cmp dword [esi - 4], 0
lea eax, [esi - 4]
jl 0x514a23
cmp ecx, dword [esi - 0x10]
jne 0x514a23
lea ebx, [esi - 0x10]
lock inc dword [eax]
jmp 0x514a5b
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov ebx, eax
test ebx, ebx
jne 0x514a37
call fcn.00402c20
mov eax, dword [esi - 0xc]
lea ecx, [ebx + 0x10]
mov dword [ebx + 4], eax
mov edx, dword [esi - 0xc]
lea eax, [edx*2 + 2]
push eax
push esi
lea edx, [edx*2 + 2]
call fcn.004c7670
add esp, 8
mov ecx, dword [ebp - 0x67c]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
push ecx
mov ecx, esp
mov byte [ebp - 4], 9
push 0x56c0b4
call fcn.00401ff0
mov ebx, dword [ebp - 0x680]
mov ecx, ebx
mov eax, dword [ebx]
mov byte [ebp - 4], 8
call dword [eax + 0xf4]
push 0x56c10c
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x688]
push 0x56c264
push eax
call fcn.004023f0
push 0x20a
lea eax, [ebp - 0x424]
push 0
push eax
call fcn.0049e130
add esp, 0x1c
lea eax, [ebp - 0x424]
push 0x104
push eax
push 0x90
push dword [ebx + 0x3f0]
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0x424]
push eax
lea ecx, [ebp - 0x684]
call fcn.00401ff0
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x660]
push dword [ebp + 0x18]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push str._i___s___p___s___n___s___ver___s_
push eax
call fcn.004023f0
mov eax, dword [0x59fadc]
add esp, 0x18
mov dword [ebp - 0x67c], 1
cmp eax, 1
jne 0x514c39
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x514b45
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514b5a
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514b5e
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x658], eax
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x660]
cmp dword [eax - 0xc], 0
je 0x514b89
push 1
push 0x56c134
lea ecx, [ebp - 0x660]
call fcn.00402320
push dword [0x59fb18]
lea eax, [ebp - 0x658]
push str._notiywnd___d_
push eax
call fcn.004023f0
mov esi, dword [ebp - 0x658]
lea ecx, [ebp - 0x660]
add esp, 0xc
push dword [esi - 0xc]
push esi
call fcn.00402320
mov eax, dword [ebp - 0x660]
cmp dword [eax - 0xc], 0
je 0x514bd6
push 1
push 0x56c364
lea ecx, [ebp - 0x660]
call fcn.00402320
push 0xe
push 0x56d5a4
lea ecx, [ebp - 0x660]
call fcn.00402320
lea ecx, [esi - 0x10]
mov dword [ebp - 0x67c], 2
or esi, 0xffffffff
mov byte [ebp - 4], 0xa
mov eax, esi
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515773
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514c30
mov eax, dword [edx + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call ebx
jmp 0x515779
mov ecx, edx
call ebx
jmp 0x515773
test eax, eax
je 0x514c4f
cmp eax, 0x2710
je 0x514c4f
cmp eax, 0x1388
jne 0x515770
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x514c6b
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514c80
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514c84
mov ecx, edx
call esi
lea ebx, [eax + 0x10]
mov dword [ebp - 0x674], ebx
mov byte [ebp - 4], 0xc
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x514cad
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514cc2
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514cc6
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x658], eax
mov esi, dword [ebp - 0x680]
mov byte [ebp - 4], 0xd
add esi, 0x64
je 0x514ce3
add esi, 0xffffffdc
jmp 0x514ce5
xor esi, esi
mov eax, dword [esi + 0x24]
lea ecx, [esi + 0x24]
push 0x79
call dword [eax + 0x38]
test eax, eax
jne 0x514d22
mov eax, dword [esi + 0x114]
lea ecx, [esi + 0x114]
push 0x79
call dword [eax + 0x38]
test eax, eax
jne 0x514d22
mov eax, dword [esi + 0x204]
lea ecx, [esi + 0x204]
push 0x79
call dword [eax + 0x38]
test eax, eax
je 0x5156fb
mov eax, dword [eax + 0x7c]
shr eax, 2
and eax, 1
je 0x5156fb
cmp dword [0x59fbf8], 0
je 0x5150d9
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x514d5a
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514d6f
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514d73
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x66c], eax
mov byte [ebp - 4], 0xe
mov eax, dword [ebp - 0x684]
cmp dword [eax - 0xc], 0
jne 0x514da5
push dword [ebp + 0xc]
lea eax, [ebp - 0x66c]
push 0x56c4ac
push eax
call fcn.004023f0
add esp, 0xc
jmp 0x514dbd
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x66c]
push 0x56c574
push eax
call fcn.004023f0
add esp, 0x10
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x514dd9
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514dee
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514df2
mov ecx, edx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x668], esi
mov byte [ebp - 4], 0xf
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x514e1b
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov edi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514e30
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514e34
mov ecx, edx
call edi
add eax, 0x10
mov dword [ebp - 0x664], eax
lea eax, [ebp - 0x664]
mov byte [ebp - 4], 0x10
push eax
call fcn.004f9fe0
mov edi, dword [ebp - 0x664]
test eax, eax
je 0x514ec5
push dword [ebp + 0xc]
lea eax, [ebp - 0x668]
push edi
push 0x56c3bc
push eax
call fcn.004023f0
mov ecx, dword [ebp - 0x658]
lea edx, [edi - 0x10]
add ecx, 0xfffffff0
add esp, 0x10
mov dword [ebp - 0x678], ecx
cmp edx, ecx
je 0x514ebf
cmp dword [ecx + 0xc], 0
jl 0x514eb0
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x514eb0
mov ecx, edx
call fcn.004021e0
mov ecx, dword [ebp - 0x678]
mov esi, eax
call fcn.00402e90
lea eax, [esi + 0x10]
mov dword [ebp - 0x658], eax
jmp 0x514ebf
push dword [edi - 0xc]
lea ecx, [ebp - 0x658]
push edi
call fcn.00402d50
mov esi, dword [ebp - 0x668]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x514f04
lea eax, [ebp - 0x664]
push eax
call fcn.004f9dc0
mov edi, dword [ebp - 0x664]
test eax, eax
je 0x514f04
push dword [ebp + 0xc]
lea eax, [ebp - 0x668]
push edi
push 0x56c42c
push eax
call fcn.004023f0
mov esi, dword [ebp - 0x668]
add esp, 0x10
mov byte [ebp - 4], 0xf
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x514f39
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514f37
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x514f39
call edx
lea ecx, [esi - 0x10]
lea edi, [ebx - 0x10]
mov dword [ebp - 0x65c], ecx
cmp ecx, edi
je 0x514f83
cmp dword [edi + 0xc], 0
jl 0x514f6e
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x514f6e
call fcn.004021e0
mov ecx, edi
mov ebx, eax
call fcn.00402e90
add ebx, 0x10
mov dword [ebp - 0x674], ebx
jmp 0x514f83
push dword [esi - 0xc]
lea ecx, [ebp - 0x674]
push esi
call fcn.00402d50
mov ebx, dword [ebp - 0x674]
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x514f9f
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov edi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x514fb4
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x514fb8
mov ecx, edx
call edi
add eax, 0x10
mov dword [ebp - 0x664], eax
mov byte [ebp - 4], 0x11
lea eax, [ebp - 0x664]
push dword [ebp + 0x10]
push 0x56d5d4
push eax
call fcn.004023f0
add esp, 0xc
lea ecx, [ebp - 0x66c]
push 0x12
push 0x56d5e4
call fcn.00402320
mov edi, dword [ebp - 0x66c]
mov ecx, dword [ebp - 0x688]
push esi
mov esi, dword [ebp - 0x664]
mov edx, esi
push 0x56d5c4
push edi
call fcn.004df0e0
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 0xf
or esi, 0xffffffff
add esp, 0xc
mov eax, esi
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x51505a
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x678], ebx
mov ebx, dword [ebp - 0x674]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515052
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x51505a
mov ecx, edx
call dword [ebp - 0x678]
mov byte [ebp - 4], 0xe
mov eax, esi
mov ecx, dword [ebp - 0x65c]
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5150a3
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x65c], ebx
mov ebx, dword [ebp - 0x674]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51509b
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5150a3
mov ecx, edx
call dword [ebp - 0x65c]
mov byte [ebp - 4], 0xd
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x5150dc
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5150d5
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5150dc
call edx
jmp 0x5150dc
or esi, 0xffffffff
cmp dword [0x59fbfc], 0
je 0x515360
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x515105
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51511a
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x51511e
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x668], eax
mov byte [ebp - 4], 0x12
mov eax, dword [ebp - 0x684]
cmp dword [eax - 0xc], 0
jne 0x515150
push dword [ebp + 0xc]
lea eax, [ebp - 0x668]
push 0x56c594
push eax
call fcn.004023f0
add esp, 0xc
jmp 0x515168
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x668]
push 0x56c90c
push eax
call fcn.004023f0
add esp, 0x10
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x515184
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515199
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x51519d
mov ecx, edx
call esi
lea edi, [eax + 0x10]
mov dword [ebp - 0x664], edi
push ebx
mov byte [ebp - 4], 0x13
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x5151f5
lea ecx, [ebx - 0x10]
lea esi, [edi - 0x10]
cmp ecx, esi
je 0x515219
cmp dword [esi + 0xc], 0
jl 0x5151e4
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x5151e4
call fcn.004021e0
mov ecx, esi
mov edi, eax
call fcn.00402e90
add edi, 0x10
mov dword [ebp - 0x664], edi
jmp 0x515219
push dword [ebx - 0xc]
lea ecx, [ebp - 0x664]
push ebx
call fcn.00402d50
jmp 0x515213
push dword [ebp + 0xc]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x664]
push 0x56c92c
push eax
call fcn.004023f0
add esp, 0x10
mov edi, dword [ebp - 0x664]
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x515235
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51524a
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x51524e
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x66c], eax
mov byte [ebp - 4], 0x14
lea eax, [ebp - 0x66c]
push dword [ebp + 0x10]
push 0x56d60c
push eax
call fcn.004023f0
add esp, 0xc
lea ecx, [ebp - 0x668]
push 0x11
push 0x56c65c
call fcn.00402320
mov ebx, dword [ebp - 0x668]
mov edx, 0x56d67c
mov esi, dword [ebp - 0x66c]
mov ecx, dword [ebp - 0x688]
push edi
push 0x56d66c
push ebx
push esi
call fcn.004dedd0
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 0x13
or esi, 0xffffffff
add esp, 0x10
mov eax, esi
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5152f4
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x65c], ebx
mov ebx, dword [ebp - 0x668]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5152ec
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5152f4
mov ecx, edx
call dword [ebp - 0x65c]
mov byte [ebp - 4], 0x12
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x51532a
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515328
mov eax, dword [ecx + 4]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call edi
jmp 0x515330
call edx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0xd
add ebx, 0xfffffff0
mov eax, esi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x515360
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51535e
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call edi
jmp 0x515360
call edx
cmp dword [0x59fc00], 0
je 0x5156a7
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x515389
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51539e
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x5153a2
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x66c], eax
mov byte [ebp - 4], 0x15
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5153cb
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5153e0
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x5153e4
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x668], eax
mov byte [ebp - 4], 0x16
mov eax, dword [ebp - 0x658]
push dword [ebp + 0xc]
cmp dword [eax - 0xc], 0
jne 0x515444
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x66c]
push 0x56d61c
push eax
call fcn.004023f0
mov eax, dword [0x59fb74]
add esp, 0x10
cmp dword [eax - 0xc], 0
jne 0x51543c
lea eax, [ebp - 0x668]
push 0x56d654
push eax
call fcn.004023f0
add esp, 8
jmp 0x515479
push eax
push 0x56cc04
jmp 0x51546a
push eax
lea eax, [ebp - 0x66c]
push 0x56ce04
push eax
call fcn.004023f0
mov eax, dword [0x59fb74]
add esp, 0x10
cmp dword [eax - 0xc], 0
je 0x515479
push eax
push 0x56d68c
lea eax, [ebp - 0x668]
push eax
call fcn.004023f0
add esp, 0xc
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x515495
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5154aa
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x5154ae
mov ecx, edx
call esi
lea edi, [eax + 0x10]
mov dword [ebp - 0x664], edi
mov byte [ebp - 4], 0x17
mov esi, dword [ebp - 0x674]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x51550c
lea ecx, [esi - 0x10]
lea ebx, [edi - 0x10]
cmp ecx, ebx
je 0x515530
cmp dword [ebx + 0xc], 0
jl 0x5154fb
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x5154fb
call fcn.004021e0
mov ecx, ebx
mov edi, eax
call fcn.00402e90
add edi, 0x10
mov dword [ebp - 0x664], edi
jmp 0x515530
push dword [esi - 0xc]
lea ecx, [ebp - 0x664]
push esi
call fcn.00402d50
jmp 0x51552a
push dword [ebp + 0xc]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x664]
push 0x56cb7c
push eax
call fcn.004023f0
add esp, 0x10
mov edi, dword [ebp - 0x664]
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x51554c
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515561
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x515565
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x678], eax
mov byte [ebp - 4], 0x18
lea eax, [ebp - 0x678]
push dword [ebp + 0x10]
push 0x56ce34
push eax
call fcn.004023f0
mov esi, dword [ebp - 0x678]
mov edx, 0x56d6b4
mov ebx, dword [ebp - 0x66c]
mov ecx, ebx
push edi
push 0x56d6c4
push dword [ebp - 0x668]
push esi
call fcn.004dedd0
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 0x17
or esi, 0xffffffff
add esp, 0x1c
mov eax, esi
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5155f7
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x65c], ebx
mov ebx, dword [ebp - 0x66c]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5155ef
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5155f7
mov ecx, edx
call dword [ebp - 0x65c]
mov byte [ebp - 4], 0x16
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x51562d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51562b
mov eax, dword [ecx + 4]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call edi
jmp 0x515633
call edx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0x15
mov eax, esi
mov ecx, dword [ebp - 0x668]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x51567b
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x65c], ebx
mov ebx, dword [ebp - 0x66c]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515673
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call edi
jmp 0x51567b
mov ecx, edx
call dword [ebp - 0x65c]
mov byte [ebp - 4], 0xd
add ebx, 0xfffffff0
mov eax, esi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x5156a7
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5156f7
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call edi
mov edi, dword [ebp - 0x670]
mov ebx, dword [ebp - 0x674]
mov byte [ebp - 4], 0xc
mov eax, esi
mov ecx, dword [ebp - 0x658]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515738
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x65c], edi
mov edi, dword [ebp - 0x670]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515730
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x515738
call edx
jmp 0x5156a7
mov eax, dword [ebp - 0x660]
cmp dword [eax - 0xc], 0
je 0x515719
push 1
push 0x56c30c
lea ecx, [ebp - 0x660]
call fcn.00402320
push 0xe
push 0x56d584
lea ecx, [ebp - 0x660]
call fcn.00402320
or esi, 0xffffffff
jmp 0x5156b3
mov ecx, edx
call dword [ebp - 0x65c]
mov byte [ebp - 4], 0xa
add ebx, 0xfffffff0
mov eax, esi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x515773
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51576c
mov eax, dword [ecx + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call ebx
jmp 0x515779
call edx
jmp 0x515773
or esi, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [0x59fb44], 1
jne 0x5157b2
mov eax, dword [ebp - 0x660]
cmp dword [eax - 0xc], 0
je 0x5157a0
push 1
push 0x56ccf4
lea ecx, [ebp - 0x660]
call fcn.00402320
push 7
push str._vm_100
lea ecx, [ebp - 0x660]
call fcn.00402320
cmp dword [0x59fbe4], 0
jne 0x5157eb
mov eax, dword [ebp - 0x660]
cmp dword [eax - 0xc], 0
je 0x5157d9
push 1
push 0x56cf94
lea ecx, [ebp - 0x660]
call fcn.00402320
push 4
push 0x56ceac
lea ecx, [ebp - 0x660]
call fcn.00402320
cmp dword [0x59fb38], 0
je 0x515938
mov eax, dword [0x59fc0c]
cmp dword [eax - 0xc], 0
je 0x515938
push 0x15
push str.__updateapkalgorithm
lea ecx, [ebp - 0x660]
call fcn.00402320
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x515835
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x65c], ecx
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515850
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x515858
mov ecx, edx
call dword [ebp - 0x65c]
add eax, 0x10
mov dword [ebp - 0x658], eax
mov byte [ebp - 4], 0x19
lea eax, [ebp - 0x658]
push dword [0x59fc10]
push 0x56d6d4
push eax
call fcn.004023f0
push 0x56d1ac
lea edx, [ebp - 0x658]
lea ecx, [ebp - 0x65c]
call fcn.00401d60
add esp, 0x10
mov byte [ebp - 4], 0x1a
lea ecx, [ebp - 0x660]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00402320
mov byte [ebp - 4], 0x19
mov eax, esi
mov edx, dword [ebp - 0x65c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x5158f0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x678], edi
mov edi, dword [ebp - 0x670]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5158ea
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x5158f0
call dword [ebp - 0x678]
mov byte [ebp - 4], 0xa
mov eax, esi
mov ecx, dword [ebp - 0x658]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515938
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x65c], edi
mov edi, dword [ebp - 0x670]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515930
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x515938
mov ecx, edx
call dword [ebp - 0x65c]
mov eax, dword [ebp - 0x684]
cmp dword [eax - 0xc], 0
je 0x515a06
push 0x56d0ac
lea ecx, [ebp - 0x658]
call fcn.00401ff0
lea ecx, [ebp - 0x684]
mov byte [ebp - 4], 0x1b
push ecx
mov edx, eax
lea ecx, [ebp - 0x65c]
call fcn.00401e60
add esp, 4
mov byte [ebp - 4], 0x1c
lea ecx, [ebp - 0x660]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00402320
mov byte [ebp - 4], 0x1b
mov eax, esi
mov edx, dword [ebp - 0x65c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x5159ce
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x678], edi
mov edi, dword [ebp - 0x670]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5159c8
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x5159ce
call dword [ebp - 0x678]
mov byte [ebp - 4], 0xa
mov eax, esi
mov ecx, dword [ebp - 0x658]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515a06
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515a02
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x515a06
mov ecx, edx
call esi
mov ecx, dword [0x59fbb8]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x515a4c
jns 0x515a1f
push 0x80070057
call fcn.00401b40
cmp word [ecx], 0x20
je 0x515a3d
push 1
push 0x56d144
lea ecx, [ebp - 0x660]
call fcn.00402320
mov ecx, dword [0x59fbb8]
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x660]
call fcn.00402320
mov ecx, dword [0x59fc08]
lea eax, [ebp - 0x658]
mov esi, dword [ebp - 0x660]
push eax
mov dword [ebp - 0x658], 0
cmp dword [ecx - 0xc], 0
push esi
jne 0x515a82
mov ecx, dword [ebp - 0x67c]
mov edx, 0x56d758
call fcn.004c7c30
jmp 0x515a8c
mov edx, 0x56d770
call fcn.004c7770
mov ecx, dword [ebp - 0x680]
add esp, 8
mov ebx, eax
push dword [ebp - 0x658]
mov eax, dword [ecx]
push ebx
call dword [eax + 0xc8]
lea ecx, [ebp - 0x654]
call fcn.00429390
mov byte [ebp - 4], 0x1d
mov dword [ebp - 0x650], ebx
mov ebx, dword [ebp - 0x680]
mov dword [ebp - 0x654], 0x64
mov dword [ebp - 0x64c], 9
mov eax, dword [ebx + 0x490]
mov dword [ebp - 0x5bc], eax
mov eax, dword [0x59fadc]
mov dword [ebp - 0x53c], eax
mov eax, dword [ebx + 0x494]
mov dword [ebp - 0x538], eax
mov eax, dword [ebx + 0x498]
mov dword [ebp - 0x534], eax
mov eax, dword [0x59fae0]
mov dword [ebp - 0x524], eax
mov eax, dword [ebx + 0x4a0]
mov dword [ebp - 0x520], eax
lea eax, [ebx + 0x4c0]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov dword [ebp - 0x51c], eax
mov eax, dword [ebx + 0x478]
mov dword [ebp - 0x67c], eax
test eax, eax
je 0x515b98
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x515b43
sub ecx, edx
sar ecx, 1
inc ecx
cmp ecx, 0x3fffffff
jg 0x515b98
lea eax, [ecx + ecx]
mov dword [ebp - 0x65c], eax
call fcn.0049bc00
mov ebx, esp
test ebx, ebx
je 0x515b98
push 0
push 0
push dword [ebp - 0x65c]
mov byte [ebx], 0
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x67c]
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ecx, ecx
test eax, eax
cmove ebx, ecx
jmp 0x515b9a
xor ebx, ebx
cmp byte [ebx], 0
jne 0x515ba3
xor ecx, ecx
jmp 0x515bb1
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x515ba8
sub ecx, edx
push ecx
push ebx
lea ecx, [ebp - 0x5b4]
call fcn.00406560
push ecx
lea eax, [ebp - 0x654]
push eax
call fcn.0044c609
mov ecx, eax
call fcn.0042af00
lea ecx, [ebp - 0x654]
mov byte [ebp - 4], 0xa
call fcn.0042a2e0
mov ebx, dword [ebp - 0x680]
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x70]
mov eax, dword [ebx]
mov ecx, ebx
push 0x2710
push 0x2710
mov dword [ebx + 0x400], 0x2710
call dword [eax + 0x1c]
mov byte [ebp - 4], 8
or eax, 0xffffffff
mov edx, dword [ebp - 0x684]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x515c44
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515c42
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x515c44
call ebx
mov ebx, dword [ebp - 0x688]
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 7
or edi, 0xffffffff
mov eax, edi
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515c93
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x65c], ebx
mov ebx, dword [ebp - 0x688]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515c8b
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x515c93
mov ecx, edx
call dword [ebp - 0x65c]
mov byte [ebp - 4], 6
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x515cc9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515cc7
mov eax, dword [ecx + 4]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call esi
jmp 0x515ccf
call edx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 5
add ebx, 0xfffffff0
mov eax, edi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x515cff
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515cfd
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call esi
jmp 0x515cff
call edx
mov eax, dword [ebp - 0x694]
test eax, eax
je 0x515d10
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 3
mov eax, edi
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515d45
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515d41
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call esi
jmp 0x515d45
mov ecx, edx
call ebx
mov byte [ebp - 4], 2
mov eax, edi
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515d7a
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515d76
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call esi
jmp 0x515d7a
mov ecx, edx
call ebx
mov byte [ebp - 4], 1
mov eax, edi
mov ecx, dword [ebp + 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515daf
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515dab
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call esi
jmp 0x515daf
mov ecx, edx
call ebx
mov byte [ebp - 4], 0
mov eax, edi
mov ecx, dword [ebp + 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x515de4
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515de0
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call esi
jmp 0x515de4
mov ecx, edx
call ebx
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 0x18]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], edi
dec edi
test edi, edi
jg 0x515e1a
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x515e16
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call esi
jmp 0x515e1a
mov ecx, edx
call edi
lea esp, [ebp - 0x6a4]
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.0049aa22
mov esp, ebp
pop ebp
ret 0x14