Function at 0x104ff28
Capabilities:
Get common file path
Persist via run registry key
Set current directory
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc58
mov eax, dword [0x1072c48]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov esi, dword [ebx + 0x18]
push edi
xor edi, edi
cmp dword [ebp + 8], 3
mov dword [ebp - 0xc40], ebx
mov dword [ebp - 0xc38], esi
je 0x104ff7b
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x104ff7b
push eax
call fcn.010561ca
test eax, eax
je 0x104ff7b
mov ecx, ebx
call fcn.0104fe0c
mov edi, eax
test edi, edi
jl 0x10506cd
test esi, esi
jne 0x104ff89
mov eax, 0x80004003
jmp 0x10506cd
push esi
call fcn.010561ca
test eax, eax
jne 0x104ff9d
mov eax, 0x80070002
jmp 0x10506cd
mov eax, dword [ebx + 0x2c]
cmp eax, 1
je 0x105033a
jle 0x1050330
cmp eax, 4
jle 0x105029e
cmp eax, 5
je 0x105015c
cmp eax, 6
jne 0x1050330
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, 0x1008570
test eax, eax
je 0x1050008
push edi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
test eax, eax
jl 0x1050008
lea eax, [ebp - 0x20c]
push eax
call fcn.010561ca
test eax, eax
jne 0x105004c
push 0x103
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x1050146
push edi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
test eax, eax
jl 0x1050146
lea eax, [ebp - 0x20c]
push eax
call fcn.010561ca
test eax, eax
je 0x1050146
cmp dword [ebp + 0x10], 0
push 0x2c
pop ecx
je 0x105005a
mov ecx, 0x22c
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x1050066
mov eax, 0x1001e44
push ecx
push eax
push dword [ebp - 0xc38]
lea eax, [ebp - 0x20c]
push eax
push 0x1008510
lea eax, [ebp - 0xc34]
push 0x208
push eax
call fcn.0103590d
add esp, 0x1c
lea eax, [ebp - 0x414]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push dword [ebp - 0xc38]
lea eax, [ebp - 0x824]
push esi
push eax
call fcn.01035811
lea eax, [ebp - 0x824]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
test eax, eax
je 0x10500c9
xor ecx, ecx
mov word [eax], cx
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x824]
push eax
call ebx
mov eax, dword [ebp - 0xc40]
mov esi, 0xffff
push esi
push dword [eax + 0x3c]
lea eax, [ebp - 0xc34]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.01059819
test eax, eax
je 0x1050102
xor edi, edi
jmp 0x105011c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1050111
push 0x57
pop eax
test eax, eax
jle 0x105011a
and eax, esi
or eax, 0x80070000
mov edi, eax
lea eax, [ebp - 0x414]
push eax
call ebx
test edi, edi
jl 0x10506ae
call fcn.010567a8
test eax, eax
je 0x10506ae
push 0
push 0x10084f4
jmp 0x1050288
push 0x10084a0
push 2
mov edi, 0x80070002
call fcn.01055c2f
jmp 0x10506ae
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, 0x1008570
test eax, eax
je 0x1050186
push edi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
lea eax, [ebp - 0x20c]
push eax
call fcn.010561ca
test eax, eax
jne 0x10501ce
push 0x103
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x10501ba
push edi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
lea eax, [ebp - 0x20c]
push eax
call fcn.010561ca
test eax, eax
je 0x1050146
lea eax, [ebp - 0x20c]
push eax
mov esi, 0x208
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01035811
cmp dword [ebp + 8], 3
lea eax, [ebp - 0x61c]
jne 0x10501fa
push 0x1008448
jmp 0x10501ff
push 0x10083e0
push esi
push eax
call fcn.01035886
push dword [ebp - 0xc38]
lea eax, [ebp - 0x61c]
push esi
push eax
call fcn.01035886
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x105022e
push eax
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01035886
mov esi, 0xffff
push esi
push dword [ebx + 0x3c]
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.01059819
test eax, eax
je 0x1050252
xor edi, edi
jmp 0x1050274
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1050261
push 0x57
pop eax
test eax, eax
jle 0x105026a
and eax, esi
or eax, 0x80070000
mov edi, eax
test edi, edi
jl 0x10506ae
call fcn.010567a8
test eax, eax
je 0x10506ae
push 0
push 0x10083c0
push 8
mov ecx, 0x10746c8
call fcn.01058b11
mov edi, 0xd2af9
jmp 0x10506ae
lea ecx, [ebp - 0xc58]
call fcn.01060532
push 1
mov ecx, 0x10746c8
call fcn.01058ade
cmp dword [ebp + 8], 3
mov eax, dword [ebx + 0x84]
mov dword [ebp - 0xc4c], eax
mov eax, 0x10083ac
je 0x10502cf
mov eax, dword [ebx + 0x14]
push dword [ebp + 0x10]
lea ecx, [ebp - 0xc58]
push eax
push esi
call fcn.010636e3
mov edi, eax
test edi, edi
jge 0x1050320
cmp byte [ebx + 0x60], 0
je 0x1050306
or dword [0x1074660], 4
push esi
push 0x1008360
push 2
call fcn.01055c69
add esp, 0xc
xor edi, edi
jmp 0x1050320
mov dword [0x1074668], edi
mov eax, dword [ebx + 0x84]
mov eax, dword [eax + 0x40]
add eax, dword [0x1072c60]
mov dword [0x1074664], eax
lea ecx, [ebp - 0xc58]
call fcn.01060551
jmp 0x10506ae
mov edi, 0x80004005
jmp 0x10506ae
push esi
push 0x207
lea eax, [ebp - 0x61c]
push eax
mov dword [ebp - 0xc3c], 1
call fcn.01035811
push 0x100835c
mov esi, 0x208
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01035886
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x1050382
push eax
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01035886
mov ecx, dword [ebx + 0x84]
push 0
call fcn.0104d133
mov ecx, 0x186a0
test edx, edx
ja 0x10503a3
jb 0x105039e
cmp eax, ecx
jae 0x10503a3
mov ecx, 0x2710
xor edx, edx
div ecx
mov dword [0x1074674], eax
cmp eax, 0x64
jbe 0x10503bf
push 0xa
xor edx, edx
pop ecx
div ecx
mov dword [0x1074674], eax
jmp 0x10503cc
push 0x14
pop ecx
cmp eax, ecx
jae 0x10503cc
mov dword [0x1074674], ecx
push 0x100833c
push dword [ebp - 0xc38]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1050406
push 0x64
mov dword [0x107466c], 1
mov esi, 0x1f4
call fcn.0105506e
mov eax, dword [0x1072c64]
mov dword [ebp - 0xc3c], eax
jmp 0x1050427
push dword [0x1074674]
and dword [0x107466c], 0
mov esi, 0x1388
call fcn.0105506e
push 0x26ec
call fcn.01055281
push 0x104c206
push esi
push 0x2f00
push dword [0x10746bc]
call dword [sym.imp.USER32.dll_SetTimer]
cmp dword [ebp - 0xc3c], 0
je 0x105048c
mov esi, 0xffff
push esi
push dword [ebx + 0x3c]
lea eax, [ebp - 0x61c]
push eax
push dword [ebp - 0xc38]
call fcn.01059819
test eax, eax
je 0x105046d
xor edi, edi
jmp 0x1050567
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x105047c
push 0x57
pop eax
test eax, eax
jle 0x1050485
and eax, esi
or eax, 0x80070000
mov edi, eax
jmp 0x1050567
push 0x100833c
push dword [ebp - 0xc38]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1050552
xor eax, eax
push eax
lea ecx, [ebp - 0xc3c]
push ecx
push eax
push 3
push eax
push eax
push eax
push 0x1002568
push 0x80000001
mov dword [ebp - 0xc3c], eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1050542
mov esi, 0x104
push esi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01058c2d
test eax, eax
je 0x1050536
push 0x100831c
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
test eax, eax
jl 0x1050536
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1050507
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push 0x10082fc
push dword [ebp - 0xc3c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0xc3c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x10082bc
push 4
call fcn.01055c69
pop ecx
pop ecx
jmp 0x1050567
push dword [ebp - 0xc38]
push 0x1008250
push 2
call fcn.01055c69
add esp, 0xc
xor esi, esi
cmp dword [0x107466c], esi
je 0x1050575
push 0x64
jmp 0x105057b
push dword [0x1074674]
call fcn.0105520b
push 0x2f00
push dword [0x10746bc]
call dword [sym.imp.USER32.dll_KillTimer]
cmp edi, esi
jge 0x10505b9
cmp byte [ebx + 0x60], 0
je 0x10505b9
push dword [ebp - 0xc38]
or dword [0x1074660], 1
push 0x1008200
push 2
call fcn.01055c69
add esp, 0xc
xor edi, edi
cmp dword [ebx + 0x5c], esi
je 0x1050617
cmp edi, 0x80070bc2
jne 0x10505ce
push esi
mov ecx, 0x10746c8
jmp 0x105062f
cmp edi, 0x8007f901
jne 0x10505da
xor edi, edi
jmp 0x1050640
cmp edi, 0x8007f02a
jne 0x10505e9
mov edi, 0xc00d2afb
jmp 0x1050640
cmp edi, esi
jl 0x10505fb
push 1
mov ecx, 0x10746c8
call fcn.01058ade
jmp 0x1050640
mov dword [0x1074668], edi
mov eax, dword [ebx + 0x84]
mov eax, dword [eax + 0x40]
add eax, dword [0x1072c60]
mov dword [0x1074664], eax
jmp 0x1050640
cmp edi, esi
jl 0x1050640
mov esi, 0x10746c8
mov ecx, esi
call fcn.0105682e
test eax, eax
je 0x1050640
push 0
mov ecx, esi
push 0x10081e4
push 8
call fcn.01058b11
mov edi, 0xd2af9
push edi
push dword [ebp - 0xc38]
call fcn.0104d261
test eax, eax
jne 0x1050665
or dword [0x1074660], 2
push 0x1008190
push 2
call fcn.01055c69
pop ecx
pop ecx
mov esi, dword [sym.imp.msvcrt.dll_wcsstr]
push 0x100817c
push dword [ebp - 0xc38]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1050691
push 0x1008160
push dword [ebp - 0xc38]
call esi
pop ecx
pop ecx
test eax, eax
je 0x10506ae
test edi, edi
jl 0x10506a7
xor eax, eax
cmp edi, 0xd2af9
setne al
mov dword [0x1072c64], eax
jmp 0x10506ae
and dword [0x1072c64], 0
push edi
push 0x100812c
push 4
call fcn.01055c69
mov ecx, dword [ebp - 0xc40]
add esp, 0xc
push 0
call fcn.0104f047
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01047464
leave
ret 0xc