Function at 0x41b640
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x588b46
mov eax, dword fs:[0]
push eax
mov eax, 0xea50
call fcn.005663c0
mov eax, dword [0x5f50fc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0x8003
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0
call fcn.00435b86
add esp, 4
call fcn.00432c22
lea ecx, [ebp - 0xea30]
call fcn.0040e580
lea ecx, [ebp - 0xea44]
mov dword [ebp - 4], 0
call fcn.004195f0
push 0x208
lea eax, [ebp - 0x530]
mov byte [ebp - 4], 1
push 0
push eax
mov dword [edi + 0xcc], 0
call fcn.00568420
add esp, 0xc
lea eax, [ebp - 0x530]
push 0x104
push eax
push dword [edi + 0x44]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x41b9fe
lea eax, [ebp - 0x530]
push 0x5c
push eax
call fcn.005688bd
add esp, 8
test eax, eax
je 0x41b9fe
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x228]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [ebp - 0x228]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41b724
sub ecx, edx
sar ecx, 1
cmp word [ebp + ecx*2 - 0x22a], 0x5c
jne 0x41b75b
lea ecx, [ecx*2 - 2]
cmp ecx, 0x208
jae 0x41ba3b
xor eax, eax
mov word [ebp + ecx - 0x228], ax
lea ecx, [ebp - 0x228]
lea eax, [ebp - 0x530]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41b78d
test dx, dx
je 0x41b789
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41b78d
add eax, 4
add ecx, 4
test dx, dx
jne 0x41b767
xor eax, eax
jmp 0x41b792
sbb eax, eax
or eax, 1
test eax, eax
je 0x41b7a3
lea eax, [ebp - 0x530]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x100
lea eax, [ebp - 0x328]
mov dword [ebp - 0xea3c], 1
push 0
push eax
mov dword [ebp - 0xea34], 1
mov dword [ebp - 0xea58], 0
mov dword [ebp - 0xea54], 0
mov dword [ebp - 0xea4c], 0
mov dword [ebp - 0xea38], 0
mov dword [ebp - 0xea48], 1
call fcn.00568420
add esp, 0xc
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
lea ecx, [ebp - 0xea44]
movups xmmword [ebp - 0x20], xmm0
push 8
push eax
lea eax, [edi + 0xd8]
push eax
lea eax, [edi + 0xd4]
push eax
lea eax, [edi + 0xd0]
push eax
lea eax, [ebp - 0xea48]
push eax
lea eax, [ebp - 0x328]
push eax
lea eax, [ebp - 0xea38]
push eax
lea eax, [ebp - 0xea4c]
push eax
lea eax, [ebp - 0xea54]
push eax
lea eax, [ebp - 0xea34]
push eax
lea eax, [ebp - 0xea3c]
push eax
lea eax, [ebp - 0xea58]
push eax
push dword [edi + 0x48]
call fcn.004196c0
mov ecx, dword [ebp - 0xea3c]
mov esi, eax
xor edx, edx
mov dword [ebp - 0xea5c], esi
mov dword [edi + 0xdc], esi
test ecx, ecx
jne 0x41b894
mov ecx, dword [ebp - 0xea34]
test ecx, ecx
je 0x41b8a9
cmp ecx, 1
jne 0x41b8a4
mov edx, ecx
jmp 0x41b8a9
cmp ecx, 1
jne 0x41b8a4
cmp dword [ebp - 0xea34], edx
lea edx, [ecx + 1]
je 0x41b8a9
mov edx, 3
lea ecx, [ebp - 0x20]
lea eax, [ecx + 2]
mov dword [ebp - 0xea50], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41b8b5
sub ecx, dword [ebp - 0xea50]
lea eax, [ebp - 0x20]
push 0
sar ecx, 1
mov ecx, 0
cmove eax, ecx
lea ecx, [ebp - 0xea30]
push eax
push dword [ebp - 0xea48]
lea eax, [ebp - 0x530]
push dword [ebp - 0xea38]
push dword [ebp - 0xea4c]
push 0x59a444
push 0x104
push eax
lea eax, [ebp - 0x328]
push eax
push esi
push edx
call fcn.00412e90
test eax, eax
je 0x41b91e
push eax
mov ecx, edi
call fcn.0041bb30
jmp 0x41ba08
cmp dword [ebp - 0xea38], 0
lea ecx, [ebp - 0xea30]
je 0x41b94c
call fcn.00410bb0
mov esi, eax
lea ecx, [ebp - 0xea30]
call fcn.00418eb0
push esi
mov ecx, edi
call fcn.0041bb30
jmp 0x41ba08
call fcn.00410bb0
mov esi, eax
test esi, esi
je 0x41b95f
cmp esi, 0xbc2
jne 0x41b934
lea ecx, [ebp - 0xea30]
call fcn.00418eb0
cmp dword [ebp - 0xea5c], 0
jne 0x41b9f4
cmp dword [ebp - 0xea3c], 0
je 0x41b9f4
cmp esi, 0xbc2
jne 0x41b9e0
push 0x110
lea eax, [ebp - 0x130]
push 0
push eax
call fcn.00568420
add esp, 0xc
mov dword [ebp - 0x134], 0x114
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x124], 2
jne 0x41b9cc
push 1
push str.SeShutdownPrivilege
mov ecx, edi
call fcn.0041ba50
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push esi
mov ecx, edi
call fcn.0041bb30
jmp 0x41ba08
cmp esi, 0x96
jne 0x41b9f4
push 0
push 0
push 0
call dword [sym.imp.SETUPAPI.dll_SetupPromptReboot]
push esi
mov ecx, edi
call fcn.0041bb30
jmp 0x41ba08
mov dword [edi + 0xcc], 9
lea ecx, [ebp - 0xea44]
call fcn.00419630
lea ecx, [ebp - 0xea30]
call fcn.0040e7d0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005663a7
mov esp, ebp
pop ebp
ret
call fcn.0056650e
int3