Function at 0x105488f
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 [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov ebx, dword [esi + 0x18]
push edi
xor edi, edi
cmp dword [ebp + 8], 3
mov dword [ebp - 0xc40], esi
mov dword [ebp - 0xc38], ebx
je 0x10548fb
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x10548fb
push eax
call fcn.01056f43
test eax, eax
je 0x10548fb
mov ecx, esi
call fcn.01050394
mov edi, eax
test edi, edi
jge 0x10548fb
cmp byte [esi + 0x60], 0
je 0x10551af
push 0x10091e0
push 2
call fcn.0105e573
xor edi, edi
jmp 0x10551af
test ebx, ebx
jne 0x1054909
mov eax, 0x80004003
jmp 0x10551b1
push ebx
call fcn.01056f43
test eax, eax
jne 0x105491d
mov eax, 0x80070002
jmp 0x10551b1
mov eax, dword [esi + 0x2c]
cmp eax, 1
je 0x1054d86
jle 0x1054d7c
cmp eax, 4
jle 0x1054cea
cmp eax, 5
je 0x1054ba7
cmp eax, 6
je 0x1054a20
cmp eax, 7
jne 0x1054d7c
mov ecx, dword [esi + 0x84]
push 0
call fcn.0104d665
xor edx, edx
mov ecx, 0x186a0
div ecx
cmp eax, 0x64
mov dword [0x1082078], eax
jbe 0x105497f
push 0xa
xor edx, edx
pop ecx
div ecx
mov dword [0x1082078], eax
push eax
call fcn.0105d977
push 0x104c76a
push 0x5dc
mov ebx, 0x2f00
push ebx
push dword [0x10821f4]
call dword [sym.imp.USER32.dll_SetTimer]
mov edi, 0x342
call fcn.0105c02d
test eax, eax
je 0x10549b4
mov edi, 0x3c2
mov ecx, dword [esi + 0x84]
call fcn.010543db
test eax, eax
jne 0x10549d4
push dword [ebp - 0xc38]
mov ecx, esi
call fcn.010504f0
test eax, eax
je 0x10549d9
mov edi, 0x3e2
push edi
push dword [ebp - 0xc38]
lea ecx, [ebp - 0xc54]
call fcn.01066f6f
lea ecx, [ebp - 0xc54]
call fcn.010678dd
push dword [0x1082078]
mov edi, eax
call fcn.0105db14
push ebx
push dword [0x10821f4]
call dword [sym.imp.USER32.dll_KillTimer]
lea ecx, [ebp - 0xc54]
call fcn.010630aa
jmp 0x1055192
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
mov edi, 0x10091c0
je 0x1054a5e
push edi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
test eax, eax
jl 0x1054a5e
lea eax, [ebp - 0x20c]
push eax
call fcn.01056f43
test eax, eax
jne 0x1054aa2
push 0x103
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x1054b91
push edi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
test eax, eax
jl 0x1054b91
lea eax, [ebp - 0x20c]
push eax
call fcn.01056f43
test eax, eax
je 0x1054b91
cmp dword [ebp + 0x10], 0
push 0x2c
pop ecx
je 0x1054ab0
mov ecx, 0x22c
mov edi, dword [ebp - 0xc40]
mov eax, dword [edi + 0x14]
test eax, eax
jne 0x1054ac2
mov eax, 0x1001e8c
push ecx
push eax
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x1009160
lea eax, [ebp - 0xc34]
push 0x208
push eax
call fcn.01034d76
add esp, 0x1c
lea eax, [ebp - 0x414]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push ebx
push esi
lea eax, [ebp - 0x824]
push eax
call fcn.01034c79
lea eax, [ebp - 0x824]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
test eax, eax
pop ecx
pop ecx
je 0x1054b1a
and word [eax], 0
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x824]
push eax
call ebx
mov esi, 0xffff
push esi
push dword [edi + 0x3c]
lea eax, [ebp - 0xc34]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0105ab51
test eax, eax
je 0x1054b4d
xor edi, edi
jmp 0x1054b67
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1054b5c
push 0x57
pop eax
test eax, eax
jle 0x1054b65
and eax, esi
or eax, 0x80070000
mov edi, eax
lea eax, [ebp - 0x414]
push eax
call ebx
test edi, edi
jl 0x1055192
call fcn.010575fe
test eax, eax
je 0x1055192
push 0
push 0x1009144
jmp 0x1054cd4
push 0x10090f0
push 2
mov edi, 0x80070002
call fcn.0105e573
jmp 0x1055192
mov esi, 0x104
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
mov edi, 0x10091c0
je 0x1054bd1
push edi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
lea eax, [ebp - 0x20c]
push eax
call fcn.01056f43
test eax, eax
jne 0x1054c19
push 0x103
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x1054c05
push edi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
lea eax, [ebp - 0x20c]
push eax
call fcn.01056f43
test eax, eax
je 0x1054b91
lea eax, [ebp - 0x20c]
push eax
mov esi, 0x208
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01034c79
cmp dword [ebp + 8], 3
lea eax, [ebp - 0x61c]
jne 0x1054c45
push 0x1009098
jmp 0x1054c4a
push 0x1009030
push esi
push eax
call fcn.01034cee
push ebx
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01034cee
mov edi, dword [ebp - 0xc40]
mov eax, dword [edi + 0x14]
test eax, eax
je 0x1054c7a
push eax
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01034cee
mov esi, 0xffff
push esi
push dword [edi + 0x3c]
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0105ab51
test eax, eax
je 0x1054c9e
xor edi, edi
jmp 0x1054cc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1054cad
push 0x57
pop eax
test eax, eax
jle 0x1054cb6
and eax, esi
or eax, 0x80070000
mov edi, eax
test edi, edi
jl 0x1055192
call fcn.010575fe
test eax, eax
je 0x1055192
push 0
push 0x1009014
push 8
mov ecx, 0x10820c8
call fcn.01059acf
mov edi, 0xd2af9
jmp 0x1055192
lea ecx, [ebp - 0xc58]
call fcn.01062d3b
push 1
mov ecx, 0x10820c8
call fcn.01059a9c
cmp dword [ebp + 8], 3
mov eax, dword [esi + 0x84]
mov dword [ebp - 0xc4c], eax
mov eax, 0x10083d4
je 0x1054d1b
mov eax, dword [esi + 0x14]
push dword [ebp + 0x10]
lea ecx, [ebp - 0xc58]
push eax
push ebx
call fcn.01066309
mov edi, eax
test edi, edi
jge 0x1054d6c
cmp byte [esi + 0x60], 0
je 0x1054d52
or dword [0x1082068], 4
push ebx
push 0x1008fc8
push 2
call fcn.0105e5ad
add esp, 0xc
xor edi, edi
jmp 0x1054d6c
mov dword [0x1082070], edi
mov eax, dword [esi + 0x84]
mov eax, dword [eax + 0x40]
add eax, dword [0x107fd94]
mov dword [0x108206c], eax
lea ecx, [ebp - 0xc58]
call fcn.01062d5a
jmp 0x1055192
mov edi, 0x80004005
jmp 0x1055192
push ebx
push 0x207
lea eax, [ebp - 0x61c]
push eax
mov dword [ebp - 0xc3c], 1
call fcn.01034c79
push 0x1008fc4
mov esi, 0x208
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01034cee
mov ebx, dword [ebp - 0xc40]
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x1054dd4
push eax
push esi
lea eax, [ebp - 0x61c]
push eax
call fcn.01034cee
mov ecx, dword [ebx + 0x84]
push 0
call fcn.0104d665
test edx, edx
mov ecx, 0x186a0
ja 0x1054df5
jb 0x1054df0
cmp eax, ecx
jae 0x1054df5
mov ecx, 0x2710
xor edx, edx
div ecx
cmp eax, 0x64
mov dword [0x108207c], eax
jbe 0x1054e11
push 0xa
xor edx, edx
pop ecx
div ecx
mov dword [0x108207c], eax
jmp 0x1054e1e
push 0x14
pop ecx
cmp eax, ecx
jae 0x1054e1e
mov dword [0x108207c], ecx
push 0x1008fa4
push dword [ebp - 0xc38]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1054e58
push 0x64
mov dword [0x1082074], 1
mov esi, 0x1f4
call fcn.0105d977
mov eax, dword [0x107fd98]
mov dword [ebp - 0xc3c], eax
jmp 0x1054e79
push dword [0x108207c]
and dword [0x1082074], 0
mov esi, 0x1388
call fcn.0105d977
push 0x26ec
call fcn.0105db8a
push 0x104c76a
push esi
mov ebx, 0x2f00
push ebx
push dword [0x10821f4]
call dword [sym.imp.USER32.dll_SetTimer]
xor esi, esi
cmp dword [ebp - 0xc3c], esi
je 0x1054ee5
mov eax, dword [ebp - 0xc40]
mov esi, 0xffff
push esi
push dword [eax + 0x3c]
lea eax, [ebp - 0x61c]
push eax
push dword [ebp - 0xc38]
call fcn.0105ab51
test eax, eax
je 0x1054ec4
xor edi, edi
jmp 0x1054ede
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1054ed3
push 0x57
pop eax
test eax, eax
jle 0x1054edc
and eax, esi
or eax, 0x80070000
mov edi, eax
xor esi, esi
jmp 0x1054fc0
push 0x1008fa4
push dword [ebp - 0xc38]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1054fab
push esi
lea eax, [ebp - 0xc3c]
push eax
push esi
push 3
push esi
push esi
push esi
push 0x10026d8
push SysReAllocString
mov dword [ebp - 0xc3c], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1054f9b
mov esi, 0x104
push esi
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01059beb
test eax, eax
je 0x1054f8d
push 0x1008f84
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
test eax, eax
jl 0x1054f8d
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1054f5e
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push 0x1008f64
push dword [ebp - 0xc3c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0xc3c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
push 0x1008f24
push 4
call fcn.0105e5ad
pop ecx
pop ecx
jmp 0x1054fc0
push dword [ebp - 0xc38]
push 0x1008eb8
push 2
call fcn.0105e5ad
add esp, 0xc
cmp dword [0x1082074], esi
je 0x1054fcc
push 0x64
jmp 0x1054fd2
push dword [0x108207c]
call fcn.0105db14
push ebx
push dword [0x10821f4]
call dword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [ebp - 0xc40]
cmp dword [eax + 0x5c], esi
je 0x10550bd
cmp edi, 0x80070bc2
jne 0x105504f
push 0x1008e90
push dword [ebp - 0xc38]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1055019
mov edi, 0xd2af8
jmp 0x105506d
lea eax, [ebp - 0xc3c]
push eax
mov dword [ebp - 0xc3c], esi
call fcn.0105d408
mov edi, eax
cmp edi, esi
jl 0x1055125
cmp dword [ebp - 0xc3c], esi
mov ecx, 0x10820c8
je 0x1055113
push 1
call fcn.01059a9c
jmp 0x105509a
cmp edi, 0x8007f901
je 0x105509a
cmp edi, 0x8007f02a
jne 0x1055069
mov edi, 0xc00d2afb
jmp 0x1055125
cmp edi, esi
jl 0x105507e
push 1
mov ecx, 0x10820c8
call fcn.01059a9c
jmp 0x1055125
cmp byte [eax + 0x60], 0
je 0x10550a1
push edi
push dword [ebp - 0xc38]
push 0x1008e38
push 2
call fcn.0105e5ad
add esp, 0x10
xor edi, edi
jmp 0x1055125
mov dword [0x1082070], edi
mov eax, dword [eax + 0x84]
mov eax, dword [eax + 0x40]
add eax, dword [0x107fd94]
mov dword [0x108206c], eax
jmp 0x1055125
cmp edi, esi
jge 0x1055101
cmp byte [eax + 0x60], 0
je 0x10550fd
push 0x1008fa4
push dword [ebp - 0xc38]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x10550e5
or dword [0x1082068], 1
push edi
push dword [ebp - 0xc38]
push 0x1008e38
push 2
call fcn.0105e5ad
add esp, 0x10
xor edi, edi
cmp edi, esi
jl 0x1055125
mov ebx, 0x10820c8
mov ecx, ebx
call fcn.01057684
test eax, eax
je 0x1055125
mov ecx, ebx
push esi
push 0x1008e1c
push 8
call fcn.01059acf
mov edi, 0xd2af9
push edi
push dword [ebp - 0xc38]
call fcn.0104d793
test eax, eax
jne 0x105514a
or dword [0x1082068], 2
push 0x1008dc8
push 2
call fcn.0105e5ad
pop ecx
pop ecx
mov ebx, dword [sym.imp.msvcrt.dll_wcsstr]
push 0x1008db0
push dword [ebp - 0xc38]
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x1055176
push 0x1008d94
push dword [ebp - 0xc38]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x1055192
cmp edi, esi
jl 0x105518c
xor eax, eax
cmp edi, 0xd2af9
setne al
mov dword [0x107fd98], eax
jmp 0x1055192
mov dword [0x107fd98], esi
push edi
push 0x1008d60
push 4
call fcn.0105e5ad
mov ecx, dword [ebp - 0xc40]
add esp, 0xc
push 0
call fcn.0104f572
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01047417
leave
ret 0xc