Function at 0x505240
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x594c68
mov eax, dword fs:[0]
push eax
sub esp, 0x474
mov eax, dword [0x5ff1d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
nop dword [eax]
mov al, byte [0x6073b1]
test al, al
jne 0x505539
mov esi, dword [0x6093cc]
push 0
call fcn.0056ed70
sub eax, 0x1e
add esp, 4
cmp esi, eax
jge 0x505539
call fcn.00505dd0
push 0x6094b4
mov esi, eax
call fcn.00535740
add esp, 4
test eax, eax
je 0x5052b9
push eax
call fcn.00535224
add esp, 4
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x5052c7
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x6094b4
mov dword [ebp - 4], 0
call fcn.00535765
add esp, 4
test eax, eax
je 0x5052e8
push eax
call fcn.00535224
add esp, 4
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0xffffffff
push 0
push eax
call fcn.00563230
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x505334
push str.C:Windows
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0057400e
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
cmp word [ebp - 0x218], ax
je 0x505372
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x505363
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x438]
call fcn.004a4ab0
push str.System32cmd.exe
lea edx, [ebp - 0x438]
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x468]
call fcn.004aba00
add esp, 4
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x424]
cmp eax, 8
jb 0x5053c7
inc eax
lea ecx, [ebp - 0x438]
push eax
push dword [ebp - 0x438]
call fcn.004a5150
xor eax, eax
mov dword [ebp - 0x424], 7
mov word [ebp - 0x438], ax
lea eax, [ebp - 0x420]
push 0x104
push eax
push 0
mov dword [ebp - 0x428], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x43c], 7
mov dword [ebp - 0x440], 0
mov word [ebp - 0x450], ax
cmp word [ebp - 0x420], ax
jne 0x505422
xor ecx, ecx
jmp 0x50543f
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x505430
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x450]
call fcn.004a4ab0
lea eax, [ebp - 0x450]
mov byte [ebp - 4], 4
push eax
mov edx, str._c__timeout_5__del
lea ecx, [ebp - 0x480]
call fcn.004ab990
mov edx, eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x468]
call fcn.00510c30
mov eax, dword [ebp - 0x46c]
add esp, 4
cmp eax, 8
jb 0x50549f
inc eax
lea ecx, [ebp - 0x480]
push eax
push dword [ebp - 0x480]
call fcn.004a5150
xor eax, eax
mov dword [ebp - 0x46c], 7
mov word [ebp - 0x480], ax
mov eax, dword [ebp - 0x43c]
mov dword [ebp - 0x470], 0
cmp eax, 8
jb 0x5054da
inc eax
lea ecx, [ebp - 0x450]
push eax
push dword [ebp - 0x450]
call fcn.004a5150
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov word [ebp - 0x450], ax
mov eax, dword [ebp - 0x454]
mov dword [ebp - 0x43c], 7
mov dword [ebp - 0x440], 0
cmp eax, 8
jb 0x50551c
inc eax
lea ecx, [ebp - 0x468]
push eax
push dword [ebp - 0x468]
call fcn.004a5150
xor eax, eax
mov dword [ebp - 0x454], 7
mov dword [ebp - 0x458], 0
mov word [ebp - 0x468], ax
call fcn.00505dd0
push 0x6094b4
mov esi, eax
call fcn.00535740
add esp, 4
test eax, eax
je 0x50555a
push eax
call fcn.00535224
add esp, 4
mov esi, dword [esi + 0x1c]
push 0x6094b4
mov dword [ebp - 4], 6
call fcn.00535765
add esp, 4
test eax, eax
je 0x50557e
push eax
call fcn.00535224
add esp, 4
push 0x3e8
push esi
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x505270
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00533fc6
mov esp, ebp
pop ebp
ret