Function at 0x4fdf80
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 0x55a7b0
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 0x4fdfd4
push eax
call fcn.004ff380
test eax, eax
jne 0x4fe002
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 0x4fe002
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4fe002
push eax
push ecx
mov ecx, ebx
call fcn.004ff5f0
test eax, eax
jne 0x4fe002
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 [0x5b29a8]
mov dl, byte [0x5b29ac]
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 [0x5ba8bc]
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 0x4fe0b0
lea eax, [ebp - 0x13c]
push eax
call fcn.0051f193
add esp, 4
test eax, eax
jne 0x4fe0b0
lea edi, [ebp - 0x13c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ebp + ecx - 0x13d], 0x5c
je 0x4fe12f
mov edi, 0x598f5c
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 0x4fe12f
mov eax, dword [0x5ba8a4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4fe114
mov edx, dword [0x5ba8a4]
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 [0x5ba8bc]
push edx
push 1
push eax
push str.TempPath
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x4fe12f
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.0051d13a
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.0051d0e8
lea eax, [ebp - 0x13c]
push eax
call fcn.0051e372
add esp, 0x18
test eax, eax
je 0x4fe20e
call fcn.0051ec14
cmp dword [eax], 0xd
je 0x4fe20e
call fcn.0051ec14
cmp dword [eax], 0x11
je 0x4fe20e
mov esi, dword [0x5bb1dc]
call fcn.0051ec14
mov ecx, dword [eax]
lea edx, [ebp - 0x13c]
push ecx
push edx
lea eax, [ebp - 0x4b8]
push esi
push eax
call fcn.0051d0e8
add esp, 0x10
lea ecx, [ebp - 0x4b8]
push 1
push ecx
mov ecx, dword [ebx + 0x3a4]
call fcn.004593e0
mov edx, dword [0x5bb1d8]
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 0x4fe237
lea eax, [ebp - 0x17c]
push str.default_user
push eax
call fcn.0051d0e8
add esp, 8
lea edi, [ebp - 0x17c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4fe2a3
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.0051d0e8
lea eax, [ebp - 0x13c]
push eax
call fcn.0051e372
add esp, 0x1c
test eax, eax
je 0x4fe35a
call fcn.0051ec14
cmp dword [eax], 0xd
je 0x4fe35a
call fcn.0051ec14
cmp dword [eax], 0x11
je 0x4fe35a
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.0051d0e8
lea edx, [ebp - 0x13c]
push edx
call fcn.0051e372
add esp, 0x18
test eax, eax
je 0x4fe35a
call fcn.0051ec14
cmp dword [eax], 0xd
je 0x4fe35a
call fcn.0051ec14
cmp dword [eax], 0x11
je 0x4fe35a
mov esi, dword [0x5bb1dc]
call fcn.0051ec14
mov eax, dword [eax]
lea ecx, [ebp - 0x13c]
push eax
push ecx
lea edx, [ebp - 0x4b8]
push esi
push edx
call fcn.0051d0e8
mov ecx, dword [ebx + 0x3a4]
add esp, 0x10
lea eax, [ebp - 0x4b8]
push 1
push eax
call fcn.004593e0
mov ecx, dword [0x5bb1d8]
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 0x599794
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 8]
push eax
call fcn.0051cb70
add esp, 8
test eax, eax
je 0x4fe3d6
mov ecx, dword [ebx + 8]
push 0x3d
push ecx
call fcn.0051c7b0
mov edx, dword [ebx + 8]
push 0x3f
push edx
mov edi, eax
call fcn.0051c7b0
mov esi, eax
mov eax, dword [ebx + 8]
push 0x2f
push eax
call fcn.0051c7b0
add esp, 0x18
cmp esi, edi
jae 0x4fe3bd
cmp edi, eax
jbe 0x4fe3bb
inc edi
push 0x1e
lea ecx, [ebp - 0x384]
push edi
push ecx
jmp 0x4fe3e3
cmp esi, edi
jbe 0x4fe3c9
cmp esi, eax
jbe 0x4fe3c9
inc esi
push 0x1e
push esi
jmp 0x4fe3dc
inc eax
push 0x1e
push eax
lea eax, [ebp - 0x384]
push eax
jmp 0x4fe3e3
mov ecx, dword [ebx + 8]
push 0x1e
push ecx
lea edx, [ebp - 0x384]
push edx
call fcn.0051ca70
mov edx, dword [ebp + 8]
add esp, 0xc
test edx, edx
jne 0x4fe420
push edx
call fcn.0051dc52
mov ecx, dword [0x5bb7cc]
add esp, 4
inc ecx
push ecx
push eax
lea eax, [ebp - 0x384]
push str._ldf_ld
push eax
mov dword [0x5bb7cc], ecx
call fcn.0051d0e8
add esp, 0x10
jmp 0x4fe447
lea edi, [ebp - 0x384]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x4fe447
push edx
lea ecx, [ebp - 0x384]
push 0x599b9c
push ecx
call fcn.0051d0e8
add esp, 0xc
lea edx, [ebp - 0x384]
lea ecx, [ebp - 0x14]
push edx
call fcn.00537b72
push 0x2d
push 0x3a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.005302de
push 0x2d
push 0x2a
lea ecx, [ebp - 0x14]
call fcn.005302de
push 0x2d
push 0x3f
lea ecx, [ebp - 0x14]
call fcn.005302de
push 0x2d
push 0x7c
lea ecx, [ebp - 0x14]
call fcn.005302de
push 0x2d
push 0x3c
lea ecx, [ebp - 0x14]
call fcn.005302de
push 0x2d
push 0x3e
lea ecx, [ebp - 0x14]
call fcn.005302de
push 0x2d
push 0x22
lea ecx, [ebp - 0x14]
call fcn.005302de
push 0x2d
push 0x5c
lea ecx, [ebp - 0x14]
call fcn.005302de
push 0x2d
push 0x25
lea ecx, [ebp - 0x14]
call fcn.005302de
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.0051d13a
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.0051d0e8
add esp, 0x14
push esi
lea eax, [ebp - 0x384]
lea ecx, [ebp - 0x280]
push eax
push ecx
mov ecx, dword [ebx + 0x3a0]
call fcn.004c9740
lea edx, [ebp - 0x280]
push edx
call fcn.0051e372
add esp, 4
test eax, eax
jne 0x4fe61f
lea eax, [ebp - 0x280]
lea ecx, [ebp - 0x4b8]
push eax
push str.Folder__s_was_created._n
push ecx
call fcn.0051d0e8
add esp, 0xc
lea edx, [ebp - 0x4b8]
push edx
mov ecx, dword [ebx + 0x3a0]
call fcn.004c96f0
lea ecx, [ebp - 0x384]
lea edx, [ebp - 0x280]
push ecx
push edx
lea eax, [ebp - 0x5bc]
push 0x598a7c
push eax
call fcn.0051d0e8
mov eax, dword [ebx + 0x2c]
add esp, 0x10
test eax, eax
je 0x4fe5ca
push eax
call fcn.005380ca
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.005380a1
mov edx, eax
add esp, 4
test edx, edx
mov dword [ebx + 0x2c], edx
jne 0x4fe742
push str.URL::set_localPath__:_Not_enough_memory__n
mov ecx, ebx
call fcn.004fdc20
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00537b04
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.0051d0e8
add esp, 0x10
lea edx, [ebp - 0x8bc]
lea eax, [ebp - 0x384]
push edx
push esi
push str._ld_s
push eax
call fcn.0051d0e8
add esp, 0x10
lea ecx, [ebp - 0x384]
lea edx, [ebp - 0x280]
push esi
push ecx
mov ecx, dword [ebx + 0x3a0]
push edx
call fcn.004c9740
lea eax, [ebp - 0x280]
push eax
call fcn.0051e372
add esp, 4
test eax, eax
jne 0x4fe6ae
lea ecx, [ebp - 0x280]
lea edx, [ebp - 0x4b8]
push ecx
push str.Folder__s_was_created._n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x4b8]
push eax
jmp 0x4fe58d
call fcn.0051ec14
cmp dword [eax], 0xd
je 0x4fe598
call fcn.0051ec14
cmp dword [eax], 0x11
je 0x4fe598
mov esi, dword [0x5bb1dc]
call fcn.0051ec14
mov ecx, dword [eax]
lea edx, [ebp - 0x280]
push ecx
push edx
lea eax, [ebp - 0x4b8]
push esi
push eax
call fcn.0051d0e8
add esp, 0x10
lea ecx, [ebp - 0x4b8]
push 1
push ecx
mov ecx, dword [ebx + 0x3a4]
call fcn.004593e0
mov edx, dword [0x5bb1d8]
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.00537b04
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 0x4fe818
mov eax, dword [ebx + 0x3a8]
test eax, eax
jne 0x4fe795
mov ecx, dword [ebp + 8]
push ecx
mov ecx, ebx
call fcn.004ffed0
test al, al
jne 0x4fe795
lea edx, [ebp - 0x5bc]
push edx
jmp 0x4fe98f
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 + 0x3a8]
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 + 0x3a8]
push str.LocalPath
push eax
call esi
mov edx, dword [ebx + 0x3a0]
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 + 0x3a8]
push edx
push 1
push eax
push str.LogFileName
push ecx
call esi
jmp 0x4fe988
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4fe988
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4fe988
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 0x5ba440
push 0
push str.SoftwareDownloadManagerGrabberStsProjects_
push 0x80000001
call esi
test eax, eax
jne 0x4fe988
mov ecx, dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
mov edx, dword [0x5b5ecc]
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.0053091a
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 0x5ba440
push 0
push ecx
push 0x80000001
call esi
test eax, eax
jne 0x4fe97c
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.0053091a
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 0x5ba440
push 0
push edx
push 0x80000001
call esi
test eax, eax
jne 0x4fe97c
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 + 0x3a0]
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.00537b04
lea eax, [ebp - 0x5bc]
push eax
mov ecx, ebx
call fcn.004ff9c0
lea ecx, [ebp - 0x14]
mov esi, eax
mov byte [ebp - 4], 0
call fcn.00537b04
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