Function at 0x4047af
Capabilities:
Get common file path

Disassembly:
jmp 0x4a3340
push ebp
lea ebp, [esp - 0x21c]
sub esp, 0x21c
push 0xfffffffffffffffe
push 0x583308
push fcn.004e1840
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x589780]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x218], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 0x22c]
mov dword [ebp - 0x38], eax
mov ebx, dword [ebp + 0x224]
mov dword [ebp - 0x44], ebx
mov edi, dword [ebp + 0x228]
mov dword [ebp - 0x40], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x4c], eax
mov dword [edi], 0x3f
test ebx, ebx
je 0x4a37b5
cmp byte [0x58e410], 0
jne 0x4a33dd
push 0
push 0x566598
call fcn.00403887
mov dword [0x58e40c], eax
mov byte [0x58e410], 1
jmp 0x4a33e2
mov eax, dword [0x58e40c]
push ebx
push 0
test eax, eax
je 0x4a342e
push 0x400
mov ebx, dword [sym.imp.KERNEL32.dll_OpenProcess]
call ebx
mov esi, eax
test esi, esi
jne 0x4a3411
push dword [ebp - 0x44]
push eax
push 0x1000
call ebx
mov esi, eax
test esi, esi
je 0x4a37b5
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x3c], edx
lea eax, [ebp - 0x3c]
push eax
push edi
push 0
push esi
call dword [0x58e40c]
mov dword [ebp - 0x40], eax
push esi
jmp 0x4a37af
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x4a37b5
push ebx
call fcn.00402ad1
mov esi, eax
mov dword [ebp - 0x28], esi
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
call fcn.00403783
test eax, eax
je 0x4a346c
push ebx
call fcn.00405795
mov ecx, eax
jmp 0x4a3472
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
test esi, esi
jne 0x4a3480
mov eax, ecx
or eax, edx
je 0x4a37ae
mov byte [ebp - 0x19], 0
xor esi, esi
mov dword [ebp - 0x3c], esi
mov eax, ecx
or eax, edx
je 0x4a35dd
lea eax, [ebp - 0x2c]
push eax
push esi
push 8
lea eax, [ebp - 0x34]
push eax
add ecx, 0x20
adc edx, esi
push edx
push ecx
push ebx
call fcn.0040b852
test eax, eax
je 0x4a36da
cmp dword [ebp - 0x2c], 8
jne 0x4a36da
cmp dword [ebp - 0x28], esi
jne 0x4a36da
mov ecx, dword [ebp - 0x34]
mov eax, ecx
mov edx, dword [ebp - 0x30]
or eax, edx
je 0x4a36da
lea eax, [ebp - 0x2c]
push eax
push esi
push 4
lea eax, [ebp - 0x20]
push eax
add ecx, 8
adc edx, esi
push edx
push ecx
push ebx
call fcn.0040b852
test eax, eax
je 0x4a36da
cmp dword [ebp - 0x2c], 4
jne 0x4a36da
cmp dword [ebp - 0x28], esi
jne 0x4a36da
lea eax, [ebp - 0x2c]
push eax
push esi
push 0x10
lea eax, [ebp]
push eax
mov ecx, dword [ebp - 0x34]
add ecx, 0x60
mov eax, dword [ebp - 0x30]
adc eax, esi
push eax
push ecx
push ebx
call fcn.0040b852
test eax, eax
je 0x4a36da
cmp dword [ebp - 0x2c], 0x10
jne 0x4a36da
cmp dword [ebp - 0x28], esi
jne 0x4a36da
mov cx, word [ebp]
test cx, cx
je 0x4a36da
mov esi, dword [ebp + 8]
mov eax, esi
mov ebx, dword [ebp + 0xc]
or eax, ebx
je 0x4a36d5
mov edx, dword [ebp - 0x38]
add edx, edx
movzx eax, cx
cmp eax, edx
jb 0x4a358c
lea ecx, [edx - 2]
cdq
sub eax, ecx
sbb edx, 0
add esi, eax
mov dword [ebp + 8], esi
adc ebx, edx
mov dword [ebp + 0xc], ebx
mov eax, dword [ebp - 0x38]
lea ecx, [eax*2 - 2]
mov word [ebp], cx
test byte [ebp - 0x20], 1
jne 0x4a359e
add esi, dword [ebp - 0x34]
mov dword [ebp + 8], esi
adc ebx, dword [ebp - 0x30]
mov dword [ebp + 0xc], ebx
lea eax, [ebp - 0x2c]
push eax
movzx eax, cx
cdq
push edx
push eax
push edi
push ebx
push esi
mov ebx, dword [ebp - 0x24]
push ebx
call fcn.0040b852
mov cx, word [ebp]
test eax, eax
je 0x4a35ce
movzx eax, cx
cdq
cmp dword [ebp - 0x2c], eax
jne 0x4a35ce
cmp dword [ebp - 0x28], edx
mov byte [ebp - 0x19], 1
je 0x4a35d2
mov byte [ebp - 0x19], 0
movzx esi, cx
mov dword [ebp - 0x3c], esi
jmp 0x4a36da
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x28]
add eax, 0x10
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4a36da
cmp dword [ebp - 0x20], 4
jne 0x4a36da
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4a36da
lea ecx, [ebp - 0x20]
push ecx
push 4
lea ecx, [ebp - 0x28]
push ecx
add eax, 8
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4a36da
cmp dword [ebp - 0x20], 4
jne 0x4a36da
lea eax, [ebp - 0x20]
push eax
push 8
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x24]
add eax, 0x38
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4a36da
cmp dword [ebp - 0x20], 8
jne 0x4a36da
mov ax, word [ebp - 0x34]
test ax, ax
je 0x4a36da
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x4a36da
mov edx, dword [ebp - 0x38]
lea esi, [edx + edx]
movzx edx, ax
cmp edx, esi
jb 0x4a3694
sub edx, esi
add ecx, 2
add ecx, edx
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x38]
lea eax, [eax*2 - 2]
mov word [ebp - 0x34], ax
test byte [ebp - 0x28], 1
jne 0x4a36a0
add ecx, dword [ebp - 0x24]
mov dword [ebp - 0x30], ecx
lea edx, [ebp - 0x20]
push edx
movzx eax, ax
push eax
push edi
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov cx, word [ebp - 0x34]
test eax, eax
je 0x4a35ce
movzx eax, cx
cmp dword [ebp - 0x20], eax
jne 0x4a35ce
mov byte [ebp - 0x19], 1
movzx esi, cx
mov dword [ebp - 0x3c], esi
jmp 0x4a36da
mov ebx, dword [ebp - 0x24]
xor esi, esi
cmp byte [ebp - 0x19], 0
je 0x4a37ae
movzx eax, si
mov dword [ebp - 0x28], eax
shr eax, 1
mov dword [ebp - 0x24], eax
xor ecx, ecx
mov word [edi + eax*2], cx
movzx esi, word [edi + 8]
mov word [edi + 8], cx
push edi
push 0x5665c0
call fcn.00405ebb
add esp, 8
lea ecx, [edi + 8]
mov word [ecx], si
test eax, eax
jne 0x4a3728
mov eax, dword [ebp - 0x28]
add eax, 0xfffffffa
push eax
push ecx
push edi
call fcn.0040a2a9
add esp, 0xc
jmp 0x4a37a7
movzx esi, word [edi + 0x18]
xor eax, eax
mov word [edi + 0x18], ax
push edi
push str.SystemRoot_
call fcn.00405ebb
add esp, 8
mov word [edi + 0x18], si
test eax, eax
jne 0x4a37a7
push 0x104
lea eax, [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff6
add ecx, eax
mov edx, dword [ebp - 0x38]
cmp ecx, edx
jb 0x4a377f
sub edx, eax
lea ecx, [edx*2 + 0x14]
movzx edx, cx
movzx ecx, dx
shr ecx, 1
xor esi, esi
mov word [edi + ecx*2], si
jmp 0x4a3782
mov edx, dword [ebp - 0x3c]
lea esi, [eax + eax]
movzx eax, dx
sub eax, 0x14
push eax
lea eax, [edi + 0x16]
push eax
lea eax, [esi + edi]
push eax
call fcn.0040a2a9
push esi
lea eax, [ebp + 0x10]
push eax
push edi
call fcn.00409f98
add esp, 0x18
mov dword [ebp - 0x40], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x40], 0
jne 0x4a38af
cmp byte [ebp + 0x230], 0
je 0x4a38af
mov dword [ebp - 4], 0
push 0
push 0x56657c
call fcn.004072fc
mov ebx, eax
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 5
call ebx
xor esi, esi
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x4a383a
mov eax, 0x10000
mov dword [ebp - 0x20], eax
add eax, eax
mov dword [ebp - 0x20], eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x20]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
push 0
push dword [ebp - 0x20]
push esi
push 5
call ebx
mov ecx, eax
test ecx, ecx
je 0x4a385a
mov eax, dword [ebp - 0x20]
cmp eax, 0x400000
jne 0x4a3805
jmp 0x4a3856
add eax, eax
mov dword [ebp - 0x20], eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
push 0
push dword [ebp - 0x20]
push esi
push 5
call ebx
mov ecx, eax
test ecx, ecx
jne 0x4a3881
mov eax, esi
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x48], eax
cmp dword [eax + 0x44], edx
jne 0x4a388a
mov eax, dword [eax + 0x3c]
mov ecx, str._System_Process_
test eax, eax
cmovne ecx, eax
push ecx
push dword [ebp - 0x38]
push edi
call fcn.004062d5
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4a38a8
mov ecx, dword [eax]
test ecx, ecx
je 0x4a3881
add eax, ecx
jmp 0x4a385f
mov dword [ebp - 4], 0xfffffffe
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x218]
xor ecx, ebp
call fcn.0040512d
lea esp, [ebp + 0x21c]
pop ebp
ret 0x10