Function at 0x475010
Capabilities:
Create process on windows
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4df1d0
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x5246a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x54], esi
mov byte [ebp - 0x49], bl
mov dword [ebp - 0x50], ebx
cmp esi, ebx
je 0x4751f3
cmp word [esi], bx
je 0x4751f3
lea ecx, [ebp - 0x50]
push ecx
push 0x20019
push ebx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4751e5
mov edi, 7
xor edx, edx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], dx
push ebx
push 0x105
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], ebx
call fcn.0040c8a0
mov eax, dword [ebp - 0x48]
mov esi, 8
cmp dword [ebp - 0x34], esi
jae 0x4750b0
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp eax, ebx
je 0x475244
cmp eax, dword [ebp - 0x38]
ja 0x475244
xor ecx, ecx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], cx
push ebx
push 0x105
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0040c8a0
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], esi
jae 0x4750f5
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, ebx
je 0x475212
cmp eax, dword [ebp - 0x1c]
ja 0x475212
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], esi
jae 0x47511c
lea eax, [ebp - 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push eax
call edi
test eax, eax
jne 0x475146
cmp dword [ebp - 0x18], esi
jb 0x47513a
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00406d09
add esp, 4
mov dword [ebp - 0x18], 7
jmp 0x475226
push 0x3c
lea eax, [ebp - 0x90]
push ebx
push eax
call fcn.004b7180
mov ecx, dword [ebp - 0x54]
add esp, 0xc
mov dword [ebp - 0x90], 0x3c
mov dword [ebp - 0x8c], 0x503
mov dword [ebp - 0x80], ecx
cmp dword [ebp - 0x18], esi
jb 0x47517f
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x78], edx
jmp 0x475185
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x90]
push edx
mov dword [ebp - 0x74], 5
mov dword [ebp - 0x64], ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
mov eax, dword [ebp - 0x48]
setne byte [ebp - 0x49]
cmp dword [ebp - 0x34], esi
jae 0x4751b0
lea eax, [ebp - 0x48]
push eax
call edi
cmp dword [ebp - 0x18], esi
jb 0x4751c4
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00406d09
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], cx
cmp dword [ebp - 0x34], esi
jb 0x4751e5
mov edx, dword [ebp - 0x48]
push edx
call fcn.00406d09
add esp, 4
mov eax, dword [ebp - 0x50]
cmp eax, ebx
je 0x4751f3
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [ebp - 0x49]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401306
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x18], esi
jb 0x475223
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00406d09
add esp, 4
mov dword [ebp - 0x18], edi
xor ecx, ecx
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], cx
cmp dword [ebp - 0x34], esi
jb 0x475255
mov edx, dword [ebp - 0x48]
push edx
call fcn.00406d09
add esp, 4
xor al, al
jmp 0x4751f6
cmp dword [ebp - 0x34], esi
jb 0x475255
mov eax, dword [ebp - 0x48]
push eax
call fcn.00406d09
add esp, 4
xor al, al
jmp 0x4751f6