Function at 0x1005dd76
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd8c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x1005e2ee
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 [0x100510f6]
call fcn.1004a596
lea edx, [ebp - 0x5c]
mov eax, fcn.1005dd76
call fcn.10056db6
test al, al
je 0x1005e2c9
cmp dword [ebp - 8], 0
je 0x1005dddf
mov eax, dword [ebp + 0xc]
add eax, eax
push eax
push 0x40
call sub.KERNEL32.dll_LocalAlloc
mov esi, eax
mov word [esi], 0x3f
mov word [esi + 2], 0
cmp dword [ebp - 4], 0
je 0x1005e233
cmp dword [0x1007f61c], 0
jne 0x1005de21
xor edx, edx
mov eax, dword [0x1007ece8]
call fcn.10050a8a
mov dword [0x1007f61c], eax
cmp dword [0x1007f61c], 0
jne 0x1005de21
mov dword [0x1007f61c], 1
cmp dword [0x1007f61c], 1
jbe 0x1005de7f
mov eax, dword [ebp - 4]
push eax
push 0
push 0x400
call sub.KERNEL32.dll_OpenProcess
mov edi, eax
test edi, edi
jne 0x1005de52
mov eax, dword [ebp - 4]
push eax
push 0
push 0x1000
call sub.KERNEL32.dll_OpenProcess
mov edi, eax
test edi, edi
je 0x1005e233
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push esi
push 0
push edi
call dword [0x1007f61c]
cmp eax, 1
sbb ebx, ebx
inc ebx
push edi
call sub.KERNEL32.dll_CloseHandle
jmp 0x1005e233
mov eax, dword [ebp - 4]
push eax
push 0
push 0x410
call sub.KERNEL32.dll_OpenProcess
mov edi, eax
test edi, edi
je 0x1005e233
mov eax, edi
call fcn.1005da76
mov dword [ebp - 0x1c], eax
call fcn.1005170e
test eax, eax
je 0x1005debb
mov eax, edi
call fcn.1005dac6
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
jmp 0x1005dec9
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x1c], 0
jne 0x1005dedf
cmp dword [ebp - 0x24], 0
jne 0x1005ded9
cmp dword [ebp - 0x28], 0
je 0x1005e22d
mov byte [ebp - 0x49], 0
xor eax, eax
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x24], 0
jne 0x1005def2
cmp dword [ebp - 0x28], 0
je 0x1005e00b
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
add eax, 0x20
adc edx, 0
push edx
push eax
lea edx, [ebp - 0x40]
mov ecx, 8
mov eax, edi
call fcn.1005db32
test al, al
je 0x1005e0f8
cmp dword [ebp - 0x3c], 0
jne 0x1005df27
cmp dword [ebp - 0x40], 0
je 0x1005e0f8
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
add eax, 8
adc edx, 0
push edx
push eax
lea edx, [ebp - 0x48]
mov ecx, 4
mov eax, edi
call fcn.1005db32
test al, al
je 0x1005e0f8
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
add eax, 0x60
adc edx, 0
push edx
push eax
lea edx, [ebp - 0x6c]
mov ecx, 0x10
mov eax, edi
call fcn.1005db32
test al, al
je 0x1005e0f8
cmp word [ebp - 0x6c], 0
jbe 0x1005e0f8
cmp dword [ebp - 0x60], 0
jne 0x1005df8c
cmp dword [ebp - 0x64], 0
je 0x1005e0f8
mov cx, word [ebp - 0x6c]
movzx eax, cx
mov edx, dword [ebp + 0xc]
add edx, edx
cmp eax, edx
jb 0x1005dfd1
movzx eax, cx
xor edx, edx
add eax, dword [ebp - 0x64]
adc edx, dword [ebp - 0x60]
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 - 0x64], eax
mov dword [ebp - 0x60], edx
mov ax, word [ebp + 0xc]
dec eax
add eax, eax
mov word [ebp - 0x6c], ax
test byte [ebp - 0x48], 1
jne 0x1005dfe9
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x60]
add eax, dword [ebp - 0x40]
adc edx, dword [ebp - 0x3c]
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
push dword [ebp - 0x60]
push dword [ebp - 0x64]
movzx ecx, word [ebp - 0x6c]
mov edx, esi
mov eax, edi
call fcn.1005db32
mov byte [ebp - 0x49], al
movzx eax, word [ebp - 0x6c]
mov dword [ebp - 0x44], eax
jmp 0x1005e0f8
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x1c]
add eax, 0x10
push eax
push edi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x1005e0f8
cmp dword [ebp - 0x14], 4
jne 0x1005e0f8
cmp dword [ebp - 0x2c], 0
je 0x1005e0f8
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x2c]
add eax, 8
push eax
push edi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x1005e0f8
cmp dword [ebp - 0x14], 4
jne 0x1005e0f8
lea eax, [ebp - 0x14]
push eax
push 8
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x2c]
add eax, 0x38
push eax
push edi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x1005e0f8
cmp dword [ebp - 0x14], 8
jne 0x1005e0f8
cmp word [ebp - 0x34], 0
jbe 0x1005e0f8
cmp dword [ebp - 0x30], 0
je 0x1005e0f8
movzx eax, word [ebp - 0x34]
mov edx, dword [ebp + 0xc]
add edx, edx
cmp eax, edx
jb 0x1005e0bb
add eax, dword [ebp - 0x30]
mov edx, dword [ebp + 0xc]
dec edx
add edx, edx
sub eax, edx
mov dword [ebp - 0x30], eax
mov ax, word [ebp + 0xc]
dec eax
add eax, eax
mov word [ebp - 0x34], ax
test byte [ebp - 0x48], 1
jne 0x1005e0c7
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x30], eax
lea eax, [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x34]
push eax
push esi
mov eax, dword [ebp - 0x30]
push eax
push edi
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x1005e0e8
movzx eax, word [ebp - 0x34]
cmp eax, dword [ebp - 0x14]
je 0x1005e0ec
xor eax, eax
jmp 0x1005e0ee
mov al, 1
mov byte [ebp - 0x49], al
movzx eax, word [ebp - 0x34]
mov dword [ebp - 0x44], eax
cmp byte [ebp - 0x49], 0
je 0x1005e22d
mov eax, dword [ebp - 0x44]
shr eax, 1
mov word [esi + eax*2], 0
cmp dword [ebp - 0x44], 8
jbe 0x1005e146
cmp word [esi], 0x5c
jne 0x1005e146
cmp word [esi + 2], 0x3f
jne 0x1005e146
cmp word [esi + 4], 0x3f
jne 0x1005e146
cmp word [esi + 6], 0x5c
jne 0x1005e146
mov ecx, dword [ebp - 0x44]
add ecx, 2
sub ecx, 8
mov edx, esi
lea eax, [esi + 8]
call fcn.100485f6
jmp 0x1005e22b
cmp dword [ebp - 0x44], 0x18
jbe 0x1005e22b
cmp word [esi], 0x5c
jne 0x1005e22b
cmp word [esi + 2], 0x53
jne 0x1005e22b
cmp word [esi + 4], 0x79
jne 0x1005e22b
cmp word [esi + 6], 0x73
jne 0x1005e22b
cmp word [esi + 8], 0x74
jne 0x1005e22b
cmp word [esi + 0xa], 0x65
jne 0x1005e22b
cmp word [esi + 0xc], 0x6d
jne 0x1005e22b
cmp word [esi + 0xe], 0x52
jne 0x1005e22b
cmp word [esi + 0x10], 0x6f
jne 0x1005e22b
cmp word [esi + 0x12], 0x6f
jne 0x1005e22b
cmp word [esi + 0x14], 0x74
jne 0x1005e22b
cmp word [esi + 0x16], 0x5c
jne 0x1005e22b
push 0x104
lea eax, [ebp - 0x274]
push eax
call sub.KERNEL32.dll_GetWindowsDirectoryW
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x44]
shr eax, 1
inc eax
sub eax, 0xb
add eax, dword [ebp - 0x18]
cmp eax, dword [ebp + 0xc]
jb 0x1005e202
mov eax, dword [ebp + 0xc]
dec eax
add eax, 0xb
sub eax, dword [ebp - 0x18]
add eax, eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
shr eax, 1
mov word [esi + eax*2], 0
mov eax, dword [ebp - 0x18]
lea edx, [esi + eax*2]
mov ecx, dword [ebp - 0x44]
add ecx, 2
sub ecx, 0x16
lea eax, [esi + 0x16]
call fcn.100485f6
mov ecx, dword [ebp - 0x18]
add ecx, ecx
mov edx, esi
lea eax, [ebp - 0x274]
call fcn.100485f6
mov bl, 1
push edi
call sub.KERNEL32.dll_CloseHandle
mov eax, ebx
xor al, 1
and al, byte [ebp + 8]
je 0x1005e2aa
lea eax, [ebp - 0xc]
call fcn.1005197a
mov eax, dword [ebp - 0xc]
call fcn.1004a3d6
test eax, eax
jl 0x1005e2aa
inc eax
xor edi, edi
mov edx, edi
add edx, edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + edx*8]
cmp edx, dword [ebp - 4]
jne 0x1005e2a6
mov bl, 1
mov eax, edi
add eax, eax
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + eax*8 + 4]
call fcn.10049bc2
cmp eax, dword [ebp + 0xc]
jb 0x1005e28d
mov eax, edi
add eax, eax
mov edx, dword [ebp - 0xc]
lea eax, [edx + eax*8 + 4]
mov edx, dword [ebp + 0xc]
dec edx
call fcn.10049e3a
mov eax, edi
add eax, eax
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + eax*8 + 4]
call fcn.10049bb2
push eax
push esi
call sub.KERNEL32.dll_lstrcpyW
jmp 0x1005e2aa
inc edi
dec eax
jne 0x1005e253
cmp dword [ebp - 8], 0
je 0x1005e2c4
test bl, bl
je 0x1005e2be
mov eax, dword [ebp - 8]
push eax
push esi
call fcn.10056efe
push esi
call sub.KERNEL32.dll_LocalFree
xor eax, eax
mov dword [ebp - 0x50], 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 0x1005e2f5
lea eax, [ebp - 0xc]
mov edx, dword [0x100510f6]
call fcn.1004a596
ret