Function at 0x406c00
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x454382
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x114
mov eax, dword [0x46da7c]
push ebx
push esi
mov dword [esp + 0x118], eax
push edi
mov dword [esp + 0x10], 0
mov edi, 1
mov dword [esp + 0x128], edi
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
test byte [0x46efcc], 1
mov byte [esp + 0x128], 2
jne 0x406c89
or dword [0x46efcc], edi
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
push 0x4566f0
mov dword [0x46efc8], eax
call fcn.0042dcd9
add esp, 4
test byte [0x46efcc], 2
jne 0x406cba
or dword [0x46efcc], 2
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
push 0x4566e0
mov dword [0x46efc4], eax
call fcn.0042dcd9
add esp, 4
mov al, byte [0x46efcc]
mov ebx, 4
test bl, al
jne 0x406cef
or dword [0x46efcc], ebx
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
push 0x4566d0
mov dword [0x46efc0], eax
call fcn.0042dcd9
add esp, 4
mov cl, byte [0x46efcc]
mov eax, 8
test al, cl
jne 0x406d25
or dword [0x46efcc], eax
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
push 0x4566c0
mov dword [0x46efbc], eax
call fcn.0042dcd9
add esp, 4
test byte [0x46efcc], 0x10
jne 0x406d56
or dword [0x46efcc], 0x10
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
push 0x4566b0
mov dword [0x46efb8], eax
call fcn.0042dcd9
add esp, 4
mov cl, byte [0x46efcc]
mov eax, 0x20
test al, cl
jne 0x406d8c
or dword [0x46efcc], eax
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
push 0x4566a0
mov dword [0x46efb4], eax
call fcn.0042dcd9
add esp, 4
mov eax, dword [0x46efc8]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x406dcc
push 0x104
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x406dcc
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406db3
sub eax, edx
push eax
lea edx, [esp + 0x1c]
push edx
mov ecx, 0x46efc8
call fcn.00402530
mov eax, dword [0x46efc4]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x406e0c
push 0x104
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x406e0c
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406df3
sub eax, edx
push eax
lea edx, [esp + 0x1c]
push edx
mov ecx, 0x46efc4
call fcn.00402530
mov eax, dword [0x46efbc]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x406e5e
lea ecx, [esp + 0xc]
push ecx
call fcn.00418bf0
add esp, 4
push eax
mov ecx, 0x46efbc
mov byte [esp + 0x12c], 3
call fcn.004029c0
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov byte [esp + 0x128], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406e5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [0x46efc0]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x406f66
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0xc], esi
mov eax, dword [esi - 4]
mov ecx, edi
sub ecx, eax
mov eax, dword [esi - 8]
sub eax, 0x104
or eax, ecx
mov byte [esp + 0x128], bl
jge 0x406ead
push 0x104
lea ecx, [esp + 0x10]
call fcn.00401530
mov esi, dword [esp + 0xc]
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test esi, esi
jne 0x406ec3
xor eax, eax
jmp 0x406ed7
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406ec8
sub eax, edx
js 0x406fdd
cmp eax, dword [esi - 8]
jg 0x406fdd
push 0x5c
mov dword [esi - 0xc], eax
push esi
mov byte [eax + esi], 0
call fcn.0042e258
add esp, 8
test eax, eax
jne 0x406efb
or eax, 0xffffffff
jmp 0x406efd
sub eax, esi
push eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
call fcn.004027c0
push eax
mov ecx, 0x46efc0
mov byte [esp + 0x12c], 5
call fcn.004029c0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x128], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov byte [esp + 0x128], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f66
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [0x46efb8]
mov ecx, dword [eax - 0xc]
test ecx, ecx
push ebp
mov ebp, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
jne 0x407037
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
mov edx, dword [0x46efb8]
mov eax, dword [edx - 4]
mov ecx, edi
sub ecx, eax
mov eax, dword [edx - 8]
sub eax, 0x104
or eax, ecx
mov byte [esp + 0x12c], 6
jge 0x406fc6
push 0x104
mov ecx, 0x46efb8
call fcn.00401530
mov edx, dword [0x46efb8]
push 0
push 5
push edx
push 0
call ebp
mov edx, dword [0x46efb8]
test edx, edx
jne 0x406fe7
xor eax, eax
jmp 0x406fff
push 0x80070057
call fcn.00401260
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406ff0
sub eax, edi
js 0x4071b0
cmp eax, dword [edx - 8]
jg 0x4071b0
mov dword [edx - 0xc], eax
mov ecx, dword [0x46efb8]
mov byte [eax + ecx], 0
lea eax, [esi - 0x10]
mov byte [esp + 0x12c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407037
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [0x46efb4]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x4070f7
call fcn.0043e731
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
mov edx, dword [0x46efb4]
mov eax, dword [edx - 4]
mov ecx, 1
sub ecx, eax
mov eax, dword [edx - 8]
sub eax, 0x104
or eax, ecx
mov byte [esp + 0x12c], 7
jge 0x407093
push 0x104
mov ecx, 0x46efb4
call fcn.00401530
mov edx, dword [0x46efb4]
push 0
push 0x10
push edx
push 0
call ebp
mov edx, dword [0x46efb4]
test edx, edx
jne 0x4070aa
xor eax, eax
jmp 0x4070bf
mov eax, edx
lea edi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4070b0
sub eax, edi
js 0x4071b0
cmp eax, dword [edx - 8]
jg 0x4071b0
mov dword [edx - 0xc], eax
mov ecx, dword [0x46efb4]
mov byte [eax + ecx], 0
lea eax, [esi - 0x10]
mov byte [esp + 0x12c], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4070f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [0x46efc8]
push eax
push str._WINDIR_
lea ecx, [esp + 0x140]
call fcn.00405f00
mov ecx, dword [0x46efc4]
push ecx
push str._WINSYSDIR_
lea ecx, [esp + 0x140]
call fcn.00405f00
mov edx, dword [0x46efbc]
push edx
push str._PROGRAMFILES_
lea ecx, [esp + 0x140]
call fcn.00405f00
mov eax, dword [0x46efc0]
push eax
push str._TARGETDIR_
lea ecx, [esp + 0x140]
call fcn.00405f00
mov ecx, dword [0x46efb8]
push ecx
push str._DOCUMENTS_
lea ecx, [esp + 0x140]
call fcn.00405f00
mov edx, dword [0x46efb4]
push edx
push str._DESKTOPDIRECTORY_
lea ecx, [esp + 0x140]
call fcn.00405f00
mov edi, dword [esp + 0x13c]
mov eax, dword [edi - 0xc]
test eax, eax
mov ebp, dword [esp + 0x138]
je 0x4071ba
push edi
push ebp
lea eax, [esp + 0x20]
push 0x458078
push eax
call fcn.00402aa0
add esp, 0x10
jmp 0x4071cb
push 0x80070057
call fcn.00401260
lea ecx, [esp + 0x138]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004029c0
mov esi, dword [esp + 0x18]
add esi, 0xfffffff0
push esi
call fcn.00401c00
mov ebx, dword [esp + 0x138]
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov byte [esp + 0x12c], 1
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x407206
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
lea eax, [ebp - 0x10]
mov byte [esp + 0x12c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407228
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [edi - 0x10]
mov dword [esp + 0x12c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40724d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x124]
pop ebp
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x114]
mov eax, ebx
pop ebx
call fcn.0042d9b6
add esp, 0x120
ret 0xc