Function at 0x52ac10
Capabilities:
Check if file exists
Get file attributes
Get session user name
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58f8e0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8b0
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
test eax, eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 4], 0
je 0x52ac64
push eax
call fcn.0052d040
test eax, eax
jne 0x52ac92
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x52ac92
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x52ac92
push eax
push ecx
mov ecx, ebx
call fcn.0052d2b0
test eax, eax
jne 0x52ac92
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [str.DwnlData]
mov ecx, dword [0x632380]
mov dl, byte [0x632384]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], ecx
lea eax, [ebp - 0x30]
lea ecx, [ebp - 0x13c]
push eax
push ecx
mov byte [ebp - 0x24], dl
mov edx, dword [0x63e518]
push 0
push 0
push str.TempPath
push edx
mov dword [ebp - 0x34], 0x40
mov dword [ebp - 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x52ad40
lea eax, [ebp - 0x13c]
push eax
call fcn.00550d4e
add esp, 4
test eax, eax
jne 0x52ad40
lea edi, [ebp - 0x13c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ebp + ecx - 0x13d], 0x5c
je 0x52adbf
mov edi, 0x617168
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x13c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x52adbf
mov eax, dword [0x63e500]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x52ada4
mov edx, dword [0x63e500]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea esi, [ebp - 0x13c]
sub edi, ecx
mov eax, ecx
mov dword [ebp - 0x20], esi
mov esi, edi
mov edi, dword [ebp - 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [0x63e518]
push edx
push 1
push eax
push str.TempPath
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x52adbf
lea edx, [ebp - 0x13c]
push 0x104
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x8bc]
lea ecx, [ebp - 0x7bc]
push eax
lea edx, [ebp - 0x6bc]
push ecx
lea eax, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x13c]
push eax
push ecx
call fcn.0054ea7c
add esp, 0x14
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x6bc]
lea ecx, [ebp - 0x18]
push edx
push eax
push ecx
lea edx, [ebp - 0x13c]
push str._s_s_s_
push edx
call fcn.0054ea2a
lea eax, [ebp - 0x13c]
push eax
call fcn.0054ff01
add esp, 0x18
test eax, eax
je 0x52ae9e
call fcn.005508e7
cmp dword [eax], 0xd
je 0x52ae9e
call fcn.005508e7
cmp dword [eax], 0x11
je 0x52ae9e
mov esi, dword [0x63ef7c]
call fcn.005508e7
mov ecx, dword [eax]
lea edx, [ebp - 0x13c]
push ecx
push edx
lea eax, [ebp - 0x4b8]
push esi
push eax
call fcn.0054ea2a
add esp, 0x10
lea ecx, [ebp - 0x4b8]
push 1
push ecx
mov ecx, dword [ebx + 0x32c]
call fcn.0046f830
mov edx, dword [0x63ef78]
push 0x50030
lea eax, [ebp - 0x4b8]
push edx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0x7546
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea ecx, [ebp - 0x34]
lea edx, [ebp - 0x17c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x52aec7
lea eax, [ebp - 0x17c]
push str.default_user
push eax
call fcn.0054ea2a
add esp, 8
lea edi, [ebp - 0x17c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x52af33
lea ecx, [ebp - 0x17c]
lea edx, [ebp - 0x2c]
push ecx
lea eax, [ebp - 0x6bc]
push edx
lea ecx, [ebp - 0x18]
push eax
push ecx
lea edx, [ebp - 0x13c]
push str._s_s_s_s_
push edx
call fcn.0054ea2a
lea eax, [ebp - 0x13c]
push eax
call fcn.0054ff01
add esp, 0x1c
test eax, eax
je 0x52afea
call fcn.005508e7
cmp dword [eax], 0xd
je 0x52afea
call fcn.005508e7
cmp dword [eax], 0x11
je 0x52afea
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x6bc]
push ecx
lea eax, [ebp - 0x18]
push edx
push eax
lea ecx, [ebp - 0x13c]
push str._s_s_sdefault_user_
push ecx
call fcn.0054ea2a
lea edx, [ebp - 0x13c]
push edx
call fcn.0054ff01
add esp, 0x18
test eax, eax
je 0x52afea
call fcn.005508e7
cmp dword [eax], 0xd
je 0x52afea
call fcn.005508e7
cmp dword [eax], 0x11
je 0x52afea
mov esi, dword [0x63ef7c]
call fcn.005508e7
mov eax, dword [eax]
lea ecx, [ebp - 0x13c]
push eax
push ecx
lea edx, [ebp - 0x4b8]
push esi
push edx
call fcn.0054ea2a
mov ecx, dword [ebx + 0x32c]
add esp, 0x10
lea eax, [ebp - 0x4b8]
push 1
push eax
call fcn.0046f830
mov ecx, dword [0x63ef78]
push 0x50030
lea edx, [ebp - 0x4b8]
push ecx
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0x7546
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x384]
push 0x6179ac
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 8]
push eax
call fcn.0054e0f0
add esp, 8
test eax, eax
je 0x52b066
mov ecx, dword [ebx + 8]
push 0x3d
push ecx
call fcn.0054dff0
mov edx, dword [ebx + 8]
push 0x3f
push edx
mov edi, eax
call fcn.0054dff0
mov esi, eax
mov eax, dword [ebx + 8]
push 0x2f
push eax
call fcn.0054dff0
add esp, 0x18
cmp esi, edi
jae 0x52b04d
cmp edi, eax
jbe 0x52b04b
inc edi
push 0x1e
lea ecx, [ebp - 0x384]
push edi
push ecx
jmp 0x52b073
cmp esi, edi
jbe 0x52b059
cmp esi, eax
jbe 0x52b059
inc esi
push 0x1e
push esi
jmp 0x52b06c
inc eax
push 0x1e
push eax
lea eax, [ebp - 0x384]
push eax
jmp 0x52b073
mov ecx, dword [ebx + 8]
push 0x1e
push ecx
lea edx, [ebp - 0x384]
push edx
call fcn.0054e560
mov edx, dword [ebp + 8]
add esp, 0xc
test edx, edx
jne 0x52b0b0
push edx
call fcn.0054f551
mov ecx, dword [0x63f588]
add esp, 4
inc ecx
push ecx
push eax
lea eax, [ebp - 0x384]
push str._ldf_ld
push eax
mov dword [0x63f588], ecx
call fcn.0054ea2a
add esp, 0x10
jmp 0x52b0d7
lea edi, [ebp - 0x384]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x52b0d7
push edx
lea ecx, [ebp - 0x384]
push 0x617e30
push ecx
call fcn.0054ea2a
add esp, 0xc
lea edx, [ebp - 0x384]
lea ecx, [ebp - 0x14]
push edx
call fcn.0056a16e
push 0x2d
push 0x3a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.005628b1
push 0x2d
push 0x2a
lea ecx, [ebp - 0x14]
call fcn.005628b1
push 0x2d
push 0x3f
lea ecx, [ebp - 0x14]
call fcn.005628b1
push 0x2d
push 0x7c
lea ecx, [ebp - 0x14]
call fcn.005628b1
push 0x2d
push 0x3c
lea ecx, [ebp - 0x14]
call fcn.005628b1
push 0x2d
push 0x3e
lea ecx, [ebp - 0x14]
call fcn.005628b1
push 0x2d
push 0x22
lea ecx, [ebp - 0x14]
call fcn.005628b1
push 0x2d
push 0x5c
lea ecx, [ebp - 0x14]
call fcn.005628b1
push 0x2d
push 0x25
lea ecx, [ebp - 0x14]
call fcn.005628b1
mov edi, dword [ebp - 0x14]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x384]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x7bc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x6bc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x8bc]
push ecx
push edx
lea ecx, [ebp - 0x18]
push eax
lea edx, [ebp - 0x384]
push ecx
push edx
call fcn.0054ea7c
mov esi, dword [ebp + 8]
add esp, 0x14
lea eax, [ebp - 0x7bc]
lea ecx, [ebp - 0x13c]
push esi
push eax
push ecx
lea edx, [ebp - 0x280]
push str._s_s__ld_
push edx
call fcn.0054ea2a
add esp, 0x14
push esi
lea eax, [ebp - 0x384]
lea ecx, [ebp - 0x280]
push eax
push ecx
mov ecx, dword [ebx + 0x328]
call fcn.004ec120
lea edx, [ebp - 0x280]
push edx
call fcn.0054ff01
add esp, 4
test eax, eax
jne 0x52b2af
lea eax, [ebp - 0x280]
lea ecx, [ebp - 0x4b8]
push eax
push str.Folder__s_was_created._n
push ecx
call fcn.0054ea2a
add esp, 0xc
lea edx, [ebp - 0x4b8]
push edx
mov ecx, dword [ebx + 0x328]
call fcn.004ec0d0
lea ecx, [ebp - 0x384]
lea edx, [ebp - 0x280]
push ecx
push edx
lea eax, [ebp - 0x5bc]
push 0x615f14
push eax
call fcn.0054ea2a
mov eax, dword [ebx + 0x2c]
add esp, 0x10
test eax, eax
je 0x52b25a
push eax
call fcn.005664c5
add esp, 4
lea edi, [ebp - 0x280]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.0056649c
mov edx, eax
add esp, 4
test edx, edx
mov dword [ebx + 0x2c], edx
jne 0x52b3d2
push str.URL::set_localPath__:_Not_enough_memory__n
mov ecx, ebx
call fcn.0052a8b0
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.0056a100
mov eax, 0x753b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x13c]
push esi
push eax
lea ecx, [ebp - 0x280]
push str._s_ld_
push ecx
call fcn.0054ea2a
add esp, 0x10
lea edx, [ebp - 0x8bc]
lea eax, [ebp - 0x384]
push edx
push esi
push str._ld_s
push eax
call fcn.0054ea2a
add esp, 0x10
lea ecx, [ebp - 0x384]
lea edx, [ebp - 0x280]
push esi
push ecx
mov ecx, dword [ebx + 0x328]
push edx
call fcn.004ec120
lea eax, [ebp - 0x280]
push eax
call fcn.0054ff01
add esp, 4
test eax, eax
jne 0x52b33e
lea ecx, [ebp - 0x280]
lea edx, [ebp - 0x4b8]
push ecx
push str.Folder__s_was_created._n
push edx
call fcn.0054ea2a
add esp, 0xc
lea eax, [ebp - 0x4b8]
push eax
jmp 0x52b21d
call fcn.005508e7
cmp dword [eax], 0xd
je 0x52b228
call fcn.005508e7
cmp dword [eax], 0x11
je 0x52b228
mov esi, dword [0x63ef7c]
call fcn.005508e7
mov ecx, dword [eax]
lea edx, [ebp - 0x280]
push ecx
push edx
lea eax, [ebp - 0x4b8]
push esi
push eax
call fcn.0054ea2a
add esp, 0x10
lea ecx, [ebp - 0x4b8]
push 1
push ecx
mov ecx, dword [ebx + 0x32c]
call fcn.0046f830
mov edx, dword [0x63ef78]
push 0x50030
lea eax, [ebp - 0x4b8]
push edx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.0056a100
mov eax, 0x7546
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea edi, [ebp - 0x280]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 8]
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
je 0x52b4a8
mov eax, dword [ebx + 0x330]
test eax, eax
jne 0x52b425
mov ecx, dword [ebp + 8]
push ecx
mov ecx, ebx
call fcn.0052e8c0
test al, al
jne 0x52b425
lea edx, [ebp - 0x5bc]
push edx
jmp 0x52b61f
lea edi, [ebp - 0x5bc]
or ecx, 0xffffffff
xor eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
repne scasb al, byte es:[edi]
not ecx
lea eax, [ebp - 0x5bc]
push ecx
mov ecx, dword [ebx + 0x330]
push eax
push 1
push 0
push str.LocalFileName
push ecx
call esi
lea edi, [ebp - 0x280]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x280]
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
mov eax, dword [ebx + 0x330]
push str.LocalPath
push eax
call esi
mov edx, dword [ebx + 0x328]
or ecx, 0xffffffff
add edx, 4
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [ebx + 0x330]
push edx
push 1
push eax
push str.LogFileName
push ecx
call esi
jmp 0x52b618
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x52b618
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x52b618
lea edx, [ebp - 0x20]
lea eax, [ebp + 8]
push edx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push eax
push 0
push 0xf003f
push 0
push 0x63e040
push 0
push str.SoftwareDownloadManagerGrabberStsProjects_
push reloc.WSOCK32.dll_accept
call esi
test eax, eax
jne 0x52b618
mov ecx, dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
mov edx, dword [0x639ad4]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
push eax
push str.SoftwareDownloadManagerGrabberStsProjects_ld_
push ecx
mov byte [ebp - 4], 2
call fcn.00562ecb
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x20]
lea eax, [ebp + 8]
push edx
push eax
push 0
push 0xf003f
push 0
push 0x63e040
push 0
push ecx
push reloc.WSOCK32.dll_accept
call esi
test eax, eax
jne 0x52b60c
mov edx, dword [ebp + 8]
push edx
call edi
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
lea edx, [ebp - 0x1c]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ld_
push edx
call fcn.00562ecb
add esp, 0x10
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
lea ecx, [ebp + 8]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0x63e040
push 0
push edx
push reloc.WSOCK32.dll_accept
call esi
test eax, eax
jne 0x52b60c
lea edi, [ebp - 0x5bc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [ebp - 0x5bc]
not ecx
push ecx
mov ecx, dword [ebp + 8]
push eax
push 1
push 0
push str.LocalFileName
push ecx
call esi
lea edi, [ebp - 0x280]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x280]
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
mov eax, dword [ebp + 8]
push str.LocalPath
push eax
call esi
mov edx, dword [ebx + 0x328]
or ecx, 0xffffffff
add edx, 4
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [ebp + 8]
push edx
push 1
push eax
push str.LogFileName
push ecx
call esi
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.0056a100
lea eax, [ebp - 0x5bc]
push eax
mov ecx, ebx
call fcn.0052d6d0
lea ecx, [ebp - 0x14]
mov esi, eax
mov byte [ebp - 4], 0
call fcn.0056a100
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc