Function at 0x508260
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 0x565b10
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 0x5082b4
push eax
call fcn.005096a0
test eax, eax
jne 0x5082e2
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 0x5082e2
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x5082e2
push eax
push ecx
mov ecx, ebx
call fcn.00509910
test eax, eax
jne 0x5082e2
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 [0x5bf530]
mov dl, byte [0x5bf534]
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 [0x5c74b0]
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 0x508390
lea eax, [ebp - 0x13c]
push eax
call fcn.005297d3
add esp, 4
test eax, eax
jne 0x508390
lea edi, [ebp - 0x13c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ebp + ecx - 0x13d], 0x5c
je 0x50840f
mov edi, 0x5a5080
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 0x50840f
mov eax, dword [0x5c7498]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x5083f4
mov edx, dword [0x5c7498]
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 [0x5c74b0]
push edx
push 1
push eax
push str.TempPath
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x50840f
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.0052776a
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.00527718
lea eax, [ebp - 0x13c]
push eax
call fcn.005289a2
add esp, 0x18
test eax, eax
je 0x5084ee
call fcn.00529287
cmp dword [eax], 0xd
je 0x5084ee
call fcn.00529287
cmp dword [eax], 0x11
je 0x5084ee
mov esi, dword [0x5c7e34]
call fcn.00529287
mov ecx, dword [eax]
lea edx, [ebp - 0x13c]
push ecx
push edx
lea eax, [ebp - 0x4b8]
push esi
push eax
call fcn.00527718
add esp, 0x10
lea ecx, [ebp - 0x4b8]
push 1
push ecx
mov ecx, dword [ebx + 0x3bc]
call fcn.0045eb80
mov edx, dword [0x5c7e30]
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 0x508517
lea eax, [ebp - 0x17c]
push str.default_user
push eax
call fcn.00527718
add esp, 8
lea edi, [ebp - 0x17c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x508583
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.00527718
lea eax, [ebp - 0x13c]
push eax
call fcn.005289a2
add esp, 0x1c
test eax, eax
je 0x50863a
call fcn.00529287
cmp dword [eax], 0xd
je 0x50863a
call fcn.00529287
cmp dword [eax], 0x11
je 0x50863a
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.00527718
lea edx, [ebp - 0x13c]
push edx
call fcn.005289a2
add esp, 0x18
test eax, eax
je 0x50863a
call fcn.00529287
cmp dword [eax], 0xd
je 0x50863a
call fcn.00529287
cmp dword [eax], 0x11
je 0x50863a
mov esi, dword [0x5c7e34]
call fcn.00529287
mov eax, dword [eax]
lea ecx, [ebp - 0x13c]
push eax
push ecx
lea edx, [ebp - 0x4b8]
push esi
push edx
call fcn.00527718
mov ecx, dword [ebx + 0x3bc]
add esp, 0x10
lea eax, [ebp - 0x4b8]
push 1
push eax
call fcn.0045eb80
mov ecx, dword [0x5c7e30]
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 0x5a58b8
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 8]
push eax
call fcn.005271a0
add esp, 8
test eax, eax
je 0x5086b6
mov ecx, dword [ebx + 8]
push 0x3d
push ecx
call fcn.00526d20
mov edx, dword [ebx + 8]
push 0x3f
push edx
mov edi, eax
call fcn.00526d20
mov esi, eax
mov eax, dword [ebx + 8]
push 0x2f
push eax
call fcn.00526d20
add esp, 0x18
cmp esi, edi
jae 0x50869d
cmp edi, eax
jbe 0x50869b
inc edi
push 0x1e
lea ecx, [ebp - 0x384]
push edi
push ecx
jmp 0x5086c3
cmp esi, edi
jbe 0x5086a9
cmp esi, eax
jbe 0x5086a9
inc esi
push 0x1e
push esi
jmp 0x5086bc
inc eax
push 0x1e
push eax
lea eax, [ebp - 0x384]
push eax
jmp 0x5086c3
mov ecx, dword [ebx + 8]
push 0x1e
push ecx
lea edx, [ebp - 0x384]
push edx
call fcn.005270a0
mov edx, dword [ebp + 8]
add esp, 0xc
test edx, edx
jne 0x508700
push edx
call fcn.00528272
mov ecx, dword [0x5c8424]
add esp, 4
inc ecx
push ecx
push eax
lea eax, [ebp - 0x384]
push str._ldf_ld
push eax
mov dword [0x5c8424], ecx
call fcn.00527718
add esp, 0x10
jmp 0x508727
lea edi, [ebp - 0x384]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x508727
push edx
lea ecx, [ebp - 0x384]
push 0x5a5cf0
push ecx
call fcn.00527718
add esp, 0xc
lea edx, [ebp - 0x384]
lea ecx, [ebp - 0x14]
push edx
call fcn.0054222c
push 0x2d
push 0x3a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.0053a99e
push 0x2d
push 0x2a
lea ecx, [ebp - 0x14]
call fcn.0053a99e
push 0x2d
push 0x3f
lea ecx, [ebp - 0x14]
call fcn.0053a99e
push 0x2d
push 0x7c
lea ecx, [ebp - 0x14]
call fcn.0053a99e
push 0x2d
push 0x3c
lea ecx, [ebp - 0x14]
call fcn.0053a99e
push 0x2d
push 0x3e
lea ecx, [ebp - 0x14]
call fcn.0053a99e
push 0x2d
push 0x22
lea ecx, [ebp - 0x14]
call fcn.0053a99e
push 0x2d
push 0x5c
lea ecx, [ebp - 0x14]
call fcn.0053a99e
push 0x2d
push 0x25
lea ecx, [ebp - 0x14]
call fcn.0053a99e
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.0052776a
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.00527718
add esp, 0x14
push esi
lea eax, [ebp - 0x384]
lea ecx, [ebp - 0x280]
push eax
push ecx
mov ecx, dword [ebx + 0x3b8]
call fcn.004d1d10
lea edx, [ebp - 0x280]
push edx
call fcn.005289a2
add esp, 4
test eax, eax
jne 0x5088ff
lea eax, [ebp - 0x280]
lea ecx, [ebp - 0x4b8]
push eax
push str.Folder__s_was_created._n
push ecx
call fcn.00527718
add esp, 0xc
lea edx, [ebp - 0x4b8]
push edx
mov ecx, dword [ebx + 0x3b8]
call fcn.004d1cc0
lea ecx, [ebp - 0x384]
lea edx, [ebp - 0x280]
push ecx
push edx
lea eax, [ebp - 0x5bc]
push 0x5a4b44
push eax
call fcn.00527718
mov eax, dword [ebx + 0x2c]
add esp, 0x10
test eax, eax
je 0x5088aa
push eax
call fcn.00542796
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.0054276d
mov edx, eax
add esp, 4
test edx, edx
mov dword [ebx + 0x2c], edx
jne 0x508a22
push str.URL::set_localPath__:_Not_enough_memory__n
mov ecx, ebx
call fcn.00507f00
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005421be
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.00527718
add esp, 0x10
lea edx, [ebp - 0x8bc]
lea eax, [ebp - 0x384]
push edx
push esi
push str._ld_s
push eax
call fcn.00527718
add esp, 0x10
lea ecx, [ebp - 0x384]
lea edx, [ebp - 0x280]
push esi
push ecx
mov ecx, dword [ebx + 0x3b8]
push edx
call fcn.004d1d10
lea eax, [ebp - 0x280]
push eax
call fcn.005289a2
add esp, 4
test eax, eax
jne 0x50898e
lea ecx, [ebp - 0x280]
lea edx, [ebp - 0x4b8]
push ecx
push str.Folder__s_was_created._n
push edx
call fcn.00527718
add esp, 0xc
lea eax, [ebp - 0x4b8]
push eax
jmp 0x50886d
call fcn.00529287
cmp dword [eax], 0xd
je 0x508878
call fcn.00529287
cmp dword [eax], 0x11
je 0x508878
mov esi, dword [0x5c7e34]
call fcn.00529287
mov ecx, dword [eax]
lea edx, [ebp - 0x280]
push ecx
push edx
lea eax, [ebp - 0x4b8]
push esi
push eax
call fcn.00527718
add esp, 0x10
lea ecx, [ebp - 0x4b8]
push 1
push ecx
mov ecx, dword [ebx + 0x3bc]
call fcn.0045eb80
mov edx, dword [0x5c7e30]
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.005421be
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 0x508af8
mov eax, dword [ebx + 0x3c0]
test eax, eax
jne 0x508a75
mov ecx, dword [ebp + 8]
push ecx
mov ecx, ebx
call fcn.0050a460
test al, al
jne 0x508a75
lea edx, [ebp - 0x5bc]
push edx
jmp 0x508c6f
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 + 0x3c0]
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 + 0x3c0]
push str.LocalPath
push eax
call esi
mov edx, dword [ebx + 0x3b8]
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 + 0x3c0]
push edx
push 1
push eax
push str.LogFileName
push ecx
call esi
jmp 0x508c68
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x508c68
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x508c68
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 0x5c6ff0
push 0
push str.SoftwareDownloadManagerGrabberStsProjects_
push reloc.WSOCK32.dll_accept
call esi
test eax, eax
jne 0x508c68
mov ecx, dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
mov edx, dword [0x5c2a74]
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.0053afda
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 0x5c6ff0
push 0
push ecx
push reloc.WSOCK32.dll_accept
call esi
test eax, eax
jne 0x508c5c
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.0053afda
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 0x5c6ff0
push 0
push edx
push reloc.WSOCK32.dll_accept
call esi
test eax, eax
jne 0x508c5c
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 + 0x3b8]
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.005421be
lea eax, [ebp - 0x5bc]
push eax
mov ecx, ebx
call fcn.00509ce0
lea ecx, [ebp - 0x14]
mov esi, eax
mov byte [ebp - 4], 0
call fcn.005421be
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