Function at 0x491d20
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f84fb
mov eax, dword fs:[0]
push eax
mov eax, 0x129c
call fcn.004c38f0
mov eax, dword [0x53ba20]
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 eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1248], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1258], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x1280], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x1260], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x1240], ebx
mov dword [ebp - 0x1238], esi
mov dword [ebp - 0x1254], eax
test ebx, ebx
jne 0x491e59
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x1288], eax
lea eax, [ebp - 0x128c]
push eax
lea eax, [ebp - 0x12a4]
mov dword [ebp - 0x1250], 0
push eax
push 0x40
lea eax, [ebp - 0x125c]
mov dword [ebp - 0x128c], 0
push eax
mov dword [ebp - 0x12a4], 0x18
mov dword [ebp - 0x12a0], 0
mov dword [ebp - 0x1298], 0
mov dword [ebp - 0x129c], 0
mov dword [ebp - 0x1294], 0
mov dword [ebp - 0x1290], 0
call sub.ntdll.dll_NtOpenThread
test eax, eax
jne 0x491e44
mov esi, dword [ebp - 0x125c]
test esi, esi
je 0x491e3e
lea eax, [ebp - 0x12a8]
push eax
push 4
lea eax, [ebp - 0x1250]
push eax
push 9
push esi
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
push esi
call edi
mov esi, dword [ebp - 0x1238]
mov ebx, dword [ebp - 0x1250]
test ebx, ebx
cmove ebx, dword [ebp - 0x1258]
mov dword [ebp - 0x1240], ebx
push 0x5563cc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x104
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea edx, [esi + 0x30]
mov dword [ebp - 0x123c], edx
nop
mov esi, dword [ebp - 0x1260]
or eax, 0xffffffff
xor ecx, ecx
mov dword [ebp - 0x1234], eax
mov word [edx], cx
test esi, esi
je 0x49202d
or ecx, 0xffffffff
xor edi, edi
mov dword [ebp - 0x1244], ecx
mov ecx, dword [esi + 0x30]
mov dword [ebp - 0x124c], ecx
cmp dword [ecx], edi
jbe 0x49202d
lea esi, [ecx + 0x10]
nop dword [eax + eax]
mov ecx, dword [esi - 4]
cmp ebx, ecx
jbe 0x491f03
mov eax, dword [esi]
add eax, ecx
cmp ebx, eax
jae 0x491efd
movzx eax, word [esi + 0xe]
add eax, 0x10
mov dword [ebp - 0x1244], ecx
add eax, esi
push eax
push 0x50e910
push edx
call fcn.0042fa90
mov edx, dword [ebp - 0x123c]
mov eax, edi
add esp, 0xc
mov dword [ebp - 0x1234], eax
jmp 0x491f03
mov eax, dword [ebp - 0x1234]
mov ecx, dword [ebp - 0x124c]
inc edi
add esi, 0x11c
cmp edi, dword [ecx]
jb 0x491ec0
cmp eax, 0xffffffff
je 0x49202d
cmp byte [ebp + 8], 0
je 0x4922b3
imul edi, eax, 0x11c
add edi, ecx
lea ecx, [ebp - 0x1264]
mov dword [ebp - 0x124c], edi
lea ebx, [edi + 0x20]
push ebx
call fcn.00466b40
push dword [eax]
call fcn.004c8c20
mov ecx, dword [ebp - 0x1238]
add esp, 4
mov dword [ecx + 0x238], eax
lea ecx, [ebp - 0x1264]
call fcn.0042d020
cmp dword [0x55b170], 0
je 0x4922b3
mov esi, dword [0x55b198]
lea ecx, [ebp - 0x1268]
push ebx
call fcn.00466b40
lea ecx, [ebp - 0x21c]
mov dword [ebp - 4], 0
push ecx
push 0
push dword [eax]
call esi
lea ecx, [ebp - 0x1268]
mov dword [ebp - 0x1234], eax
mov dword [ebp - 4], 0xffffffff
call fcn.0042d020
mov eax, dword [edi + 0xc]
lea ecx, [ebp - 0x126c]
mov ebx, dword [0x55b170]
cdq
mov edi, eax
mov esi, edx
mov eax, dword [ebp - 0x124c]
add eax, 0x20
push eax
call fcn.00466b40
push 0
push esi
mov esi, dword [ebp - 0x1234]
push edi
push 0
push dword [eax]
mov dword [ebp - 4], 1
push esi
push dword [ebp - 0x1248]
call ebx
lea ecx, [ebp - 0x126c]
mov dword [ebp - 4], 0xffffffff
call fcn.0042d020
test esi, esi
je 0x4922b3
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
mov dword [ebp - 0xa30], 0x58
mov dword [ebp - 0x9e0], 0x1d5
jmp 0x4922d1
mov ecx, dword [ebp - 0x1254]
xor edi, edi
mov dword [ebp - 0x1244], 0xffffffff
cmp dword [ecx], edi
jbe 0x4922b3
lea esi, [ecx + 0x20]
nop word [eax + eax]
mov ecx, dword [esi - 0x14]
cmp ebx, ecx
jbe 0x49209e
mov eax, dword [esi - 0x10]
add eax, ecx
cmp ebx, eax
jae 0x492098
push 0x5c
push esi
mov dword [ebp - 0x1244], ecx
call fcn.004c5c50
add esp, 8
test eax, eax
je 0x492078
inc eax
jmp 0x49207a
mov eax, esi
push eax
push 0x50e910
push dword [ebp - 0x123c]
call fcn.0042fa90
mov eax, edi
add esp, 0xc
mov dword [ebp - 0x1234], eax
jmp 0x49209e
mov eax, dword [ebp - 0x1234]
mov ecx, dword [ebp - 0x1254]
inc edi
add esi, 0x11c
cmp edi, dword [ecx]
jb 0x492050
cmp eax, 0xffffffff
je 0x4922b3
imul ebx, eax, 0x11c
xor edi, edi
add ebx, ecx
lea ecx, [ebp - 0x1270]
mov dword [ebp - 0x1234], ebx
lea eax, [ebx + 0x20]
push eax
call fcn.0048d790
push 0xc
push 0x50f604
push dword [eax]
call fcn.004c94d0
add esp, 0xc
lea ecx, [ebp - 0x1270]
mov esi, eax
call fcn.0042d020
test esi, esi
jne 0x492147
lea eax, [ebx + 0x2c]
push eax
lea ecx, [ebp - 0x1274]
call fcn.0048d790
push dword [eax]
lea eax, [ebp - 0x428]
push 0x5131c8
push eax
call fcn.0048d4a0
add esp, 0xc
lea ecx, [ebp - 0x1274]
call fcn.0042d020
push 0x105
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x492262
cmp byte [ebx + 0x21], 0x3a
jne 0x492182
lea eax, [ebx + 0x20]
push eax
lea ecx, [ebp - 0x1278]
call fcn.00466b40
push dword [eax]
lea eax, [ebp - 0x21c]
push 0x105
push eax
call fcn.004c905a
add esp, 0xc
lea ecx, [ebp - 0x1278]
call fcn.0042d020
jmp 0x492262
cmp byte [ebx + 0x25], 0x3a
jne 0x4921bd
lea eax, [ebx + 0x24]
push eax
lea ecx, [ebp - 0x127c]
call fcn.00466b40
push dword [eax]
lea eax, [ebp - 0x21c]
push 0x105
push eax
call fcn.004c905a
add esp, 0xc
lea ecx, [ebp - 0x127c]
call fcn.0042d020
jmp 0x492262
mov ebx, dword [ebp - 0x123c]
lea eax, [ebp - 0x630]
push ebx
push eax
lea eax, [ebp - 0x21c]
push 0x5131ec
push eax
call fcn.0048d4a0
mov eax, dword [0x55b198]
lea ecx, [ebp - 0x428]
add esp, 0x10
push ecx
lea ecx, [ebp - 0x630]
push ecx
lea ecx, [ebp - 0x21c]
push ecx
call eax
mov edi, eax
test edi, edi
je 0x492222
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.004c9380
add esp, 8
test eax, eax
je 0x49225c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x428]
push 0x5131ec
push eax
call fcn.0048d4a0
mov eax, dword [0x55b198]
lea ecx, [ebp - 0x21c]
add esp, 0x10
push ecx
lea ecx, [ebp - 0x630]
push ecx
lea ecx, [ebp - 0x428]
push ecx
call eax
mov edi, eax
mov ebx, dword [ebp - 0x1234]
lea eax, [ebp - 0x21c]
push eax
call fcn.004c8c20
mov ecx, dword [ebp - 0x1238]
add esp, 4
mov dword [ecx + 0x238], eax
mov ecx, dword [0x55b170]
test ecx, ecx
je 0x4922a8
cmp byte [ebp + 8], 0
je 0x4922a8
push dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
cdq
push edx
push eax
push 0
lea eax, [ebp - 0x21c]
push eax
push edi
push dword [ebp - 0x1248]
call ecx
test edi, edi
je 0x4922b3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp + 8], 0
mov dword [ebp - 0xa30], 0x58
mov dword [ebp - 0x9e0], 0x1d5
je 0x492386
mov ecx, dword [0x55b160]
mov esi, dword [ebp - 0x1240]
test ecx, ecx
je 0x49238c
lea eax, [ebp - 0xa30]
push eax
lea eax, [ebp - 0x1284]
push eax
mov eax, esi
cdq
push edx
push eax
push dword [ebp - 0x1248]
call ecx
test eax, eax
je 0x49238c
mov ecx, dword [ebp - 0x123c]
mov edx, ecx
mov eax, dword [ebp - 0x9e4]
lea esi, [edx + 2]
mov byte [ebp + eax*2 - 0x9dc], 0
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x492321
sub edx, esi
lea esi, [ecx + 2]
sar edx, 1
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x492333
mov edi, dword [ebp - 0x1280]
sub ecx, esi
mov esi, dword [ebp - 0x1284]
mov eax, esi
sar ecx, 1
or eax, edi
lea eax, [ebp - 0x9dc]
je 0x4923af
push edi
push esi
push eax
push 0x513208
mov eax, 0x104
sub eax, edx
push 0xffffffffffffffff
push eax
mov eax, dword [ebp - 0x1238]
lea eax, [eax + ecx*2]
add eax, 0x30
push eax
call fcn.004b2d90
add esp, 0x1c
jmp 0x492413
mov esi, dword [ebp - 0x1240]
mov edx, dword [ebp - 0x123c]
cmp word [edx], 0
jne 0x4923de
mov eax, dword [ebp - 0x1258]
cmp esi, eax
je 0x4923d6
mov ebx, eax
mov dword [ebp - 0x1240], ebx
jmp 0x491e80
push eax
push 0x513220
mov eax, 0x104
sub eax, edx
push 0xffffffffffffffff
push eax
mov eax, dword [ebp - 0x1238]
lea eax, [eax + ecx*2]
add eax, 0x30
push eax
call fcn.004b2d90
add esp, 0x14
jmp 0x492413
push esi
push 0x50e888
jmp 0x4923ea
sub esi, dword [ebp - 0x1244]
push esi
push 0x513228
lea eax, [ebp - 0x1230]
push eax
call fcn.0044c5f0
add esp, 0xc
lea eax, [ebp - 0x1230]
push eax
push 0x104
push dword [ebp - 0x123c]
call fcn.004d6277
add esp, 0xc
push 0x5563cc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
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.004c3287
mov esp, ebp
pop ebp
ret