Function at 0x4170c8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd94
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov edi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x417641
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
mov edx, dword [0x40a40c]
call fcn.00404588
lea edx, [ebp - 0x54]
mov eax, 0x417694
call fcn.0040fa04
test al, al
je 0x41761c
cmp dword [ebp - 8], 0
je 0x417131
mov eax, dword [ebp + 0xc]
add eax, eax
push eax
push 0x40
call sub.KERNEL32.dll_LocalAlloc
mov edi, eax
mov word [edi], 0x3f
mov word [edi + 2], 0
cmp dword [ebp - 4], 0
je 0x41758c
cmp dword [0x4d3f74], 0
jne 0x417173
xor edx, edx
mov eax, dword [0x4d3d28]
call fcn.00409ea4
mov dword [0x4d3f74], eax
cmp dword [0x4d3f74], 0
jne 0x417173
mov dword [0x4d3f74], 1
cmp dword [0x4d3f74], 1
jbe 0x4171d1
mov eax, dword [ebp - 4]
push eax
push 0
push 0x400
call sub.KERNEL32.dll_OpenProcess
mov esi, eax
test esi, esi
jne 0x4171a4
mov eax, dword [ebp - 4]
push eax
push 0
push 0x1000
call sub.KERNEL32.dll_OpenProcess
mov esi, eax
test esi, esi
je 0x41758c
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push edi
push 0
push esi
call dword [0x4d3f74]
cmp eax, 1
sbb ebx, ebx
inc ebx
push esi
call sub.KERNEL32.dll_CloseHandle
jmp 0x41758c
mov eax, dword [ebp - 4]
push eax
push 0
push 0x410
call sub.KERNEL32.dll_OpenProcess
mov esi, eax
test esi, esi
je 0x41758c
mov eax, esi
call fcn.00416e64
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x417214
push esi
call fcn.00416f8c
test eax, eax
je 0x417214
mov eax, esi
call fcn.00416eb4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
jmp 0x417222
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp - 0x18], 0
jne 0x417238
cmp dword [ebp - 0x1c], 0
jne 0x417232
cmp dword [ebp - 0x20], 0
je 0x417586
mov byte [ebp - 0x41], 0
xor eax, eax
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x1c], 0
jne 0x41724b
cmp dword [ebp - 0x20], 0
je 0x417364
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
add eax, 0x20
adc edx, 0
push edx
push eax
lea edx, [ebp - 0x30]
mov ecx, 8
mov eax, esi
call fcn.00416f20
test al, al
je 0x417451
cmp dword [ebp - 0x2c], 0
jne 0x417280
cmp dword [ebp - 0x30], 0
je 0x417451
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
add eax, 8
adc edx, 0
push edx
push eax
lea edx, [ebp - 0x40]
mov ecx, 4
mov eax, esi
call fcn.00416f20
test al, al
je 0x417451
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
add eax, 0x60
adc edx, 0
push edx
push eax
lea edx, [ebp - 0x64]
mov ecx, 0x10
mov eax, esi
call fcn.00416f20
test al, al
je 0x417451
cmp word [ebp - 0x64], 0
jbe 0x417451
cmp dword [ebp - 0x58], 0
jne 0x4172e5
cmp dword [ebp - 0x5c], 0
je 0x417451
mov cx, word [ebp - 0x64]
movzx eax, cx
mov edx, dword [ebp + 0xc]
add edx, edx
cmp eax, edx
jb 0x41732a
movzx eax, cx
xor edx, edx
add eax, dword [ebp - 0x5c]
adc edx, dword [ebp - 0x58]
push edx
push eax
mov eax, dword [ebp + 0xc]
dec eax
add eax, eax
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], edx
mov ax, word [ebp + 0xc]
dec eax
add eax, eax
mov word [ebp - 0x64], ax
test byte [ebp - 0x40], 1
jne 0x417342
mov eax, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
add eax, dword [ebp - 0x30]
adc edx, dword [ebp - 0x2c]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], edx
push dword [ebp - 0x58]
push dword [ebp - 0x5c]
movzx ecx, word [ebp - 0x64]
mov edx, edi
mov eax, esi
call fcn.00416f20
mov byte [ebp - 0x41], al
movzx eax, word [ebp - 0x64]
mov dword [ebp - 0x3c], eax
jmp 0x417451
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x18]
add eax, 0x10
push eax
push esi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x417451
cmp dword [ebp - 0x14], 4
jne 0x417451
cmp dword [ebp - 0x24], 0
je 0x417451
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x24]
add eax, 8
push eax
push esi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x417451
cmp dword [ebp - 0x14], 4
jne 0x417451
lea eax, [ebp - 0x14]
push eax
push 8
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x24]
add eax, 0x38
push eax
push esi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x417451
cmp dword [ebp - 0x14], 8
jne 0x417451
cmp word [ebp - 0x38], 0
jbe 0x417451
cmp dword [ebp - 0x34], 0
je 0x417451
movzx eax, word [ebp - 0x38]
mov edx, dword [ebp + 0xc]
add edx, edx
cmp eax, edx
jb 0x417414
add eax, dword [ebp - 0x34]
mov edx, dword [ebp + 0xc]
dec edx
add edx, edx
sub eax, edx
mov dword [ebp - 0x34], eax
mov ax, word [ebp + 0xc]
dec eax
add eax, eax
mov word [ebp - 0x38], ax
test byte [ebp - 0x40], 1
jne 0x417420
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x34], eax
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x38]
push eax
push edi
mov eax, dword [ebp - 0x34]
push eax
push esi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x417441
movzx eax, word [ebp - 0x38]
cmp eax, dword [ebp - 0x14]
je 0x417445
xor eax, eax
jmp 0x417447
mov al, 1
mov byte [ebp - 0x41], al
movzx eax, word [ebp - 0x38]
mov dword [ebp - 0x3c], eax
cmp byte [ebp - 0x41], 0
je 0x417586
mov eax, dword [ebp - 0x3c]
shr eax, 1
mov word [edi + eax*2], 0
cmp dword [ebp - 0x3c], 8
jbe 0x41749f
cmp word [edi], 0x5c
jne 0x41749f
cmp word [edi + 2], 0x3f
jne 0x41749f
cmp word [edi + 4], 0x3f
jne 0x41749f
cmp word [edi + 6], 0x5c
jne 0x41749f
mov ecx, dword [ebp - 0x3c]
add ecx, 2
sub ecx, 8
mov edx, edi
lea eax, [edi + 8]
call fcn.004025ec
jmp 0x417584
cmp dword [ebp - 0x3c], 0x18
jbe 0x417584
cmp word [edi], 0x5c
jne 0x417584
cmp word [edi + 2], 0x53
jne 0x417584
cmp word [edi + 4], 0x79
jne 0x417584
cmp word [edi + 6], 0x73
jne 0x417584
cmp word [edi + 8], 0x74
jne 0x417584
cmp word [edi + 0xa], 0x65
jne 0x417584
cmp word [edi + 0xc], 0x6d
jne 0x417584
cmp word [edi + 0xe], 0x52
jne 0x417584
cmp word [edi + 0x10], 0x6f
jne 0x417584
cmp word [edi + 0x12], 0x6f
jne 0x417584
cmp word [edi + 0x14], 0x74
jne 0x417584
cmp word [edi + 0x16], 0x5c
jne 0x417584
push 0x104
lea eax, [ebp - 0x26c]
push eax
call sub.KERNEL32.dll_GetWindowsDirectoryW
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x3c]
shr eax, 1
inc eax
sub eax, 0xb
add eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0xc]
jb 0x41755b
mov eax, dword [ebp + 0xc]
dec eax
add eax, 0xb
sub eax, dword [ebp - 0x14]
add eax, eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
shr eax, 1
mov word [edi + eax*2], 0
mov eax, dword [ebp - 0x14]
lea edx, [edi + eax*2]
mov ecx, dword [ebp - 0x3c]
add ecx, 2
sub ecx, 0x16
lea eax, [edi + 0x16]
call fcn.004025ec
mov ecx, dword [ebp - 0x14]
add ecx, ecx
mov edx, edi
lea eax, [ebp - 0x26c]
call fcn.004025ec
mov bl, 1
push esi
call sub.KERNEL32.dll_CloseHandle
mov eax, ebx
xor al, 1
and al, byte [ebp + 8]
je 0x417603
lea eax, [ebp - 0xc]
call fcn.0040a9fc
mov eax, dword [ebp - 0xc]
call fcn.004043c8
test eax, eax
jl 0x417603
inc eax
xor esi, esi
mov edx, esi
add edx, edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + edx*8]
cmp edx, dword [ebp - 4]
jne 0x4175ff
mov bl, 1
mov eax, esi
add eax, eax
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + eax*8 + 4]
call fcn.00403ca4
cmp eax, dword [ebp + 0xc]
jb 0x4175e6
mov eax, esi
add eax, eax
mov edx, dword [ebp - 0xc]
lea eax, [edx + eax*8 + 4]
mov edx, dword [ebp + 0xc]
dec edx
call fcn.00403e2c
mov eax, esi
add eax, eax
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + eax*8 + 4]
call fcn.00403c94
push eax
push edi
call sub.KERNEL32.dll_lstrcpyW
jmp 0x417603
inc esi
dec eax
jne 0x4175ac
test bl, bl
je 0x417617
cmp dword [ebp - 8], 0
je 0x417617
mov eax, dword [ebp - 8]
push eax
push edi
call fcn.0040fb48
xor eax, eax
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x417648
lea eax, [ebp - 0xc]
mov edx, dword [0x40a40c]
call fcn.00404588
ret