Function at 0x403f3a
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4a597c
call fcn.00483228
sub esp, 0x120
push ebx
push esi
push edi
mov esi, ecx
call fcn.0049d404
lea edi, [esi + 0x58]
push edi
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
je 0x403f6e
mov ecx, esi
call fcn.0049d419
jmp 0x4040be
mov eax, dword [esi + 0x5c]
and dword [ebp - 0x10], 0
push 0x4e7e70
lea ecx, [ebp - 0x18]
mov ebx, dword [eax + 4]
call fcn.0049d946
mov eax, dword [esi + 0x6c]
and dword [ebp - 4], 0
test eax, eax
je 0x40405f
test esi, esi
jne 0x403f9c
xor eax, eax
jmp 0x403f9f
mov eax, dword [esi + 0x1c]
lea ecx, [ebp - 0x10]
push ecx
push 0x11
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x404098
mov eax, dword [ebx]
lea ecx, [ebp - 0x12c]
push ecx
push 1
push dword [ebp - 0x10]
push ebx
call dword [eax + 0x2c]
test eax, eax
jl 0x404098
push dword [ebp - 0x10]
lea eax, [ebp - 0x12c]
mov ecx, esi
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00404628
lea eax, [ebp - 0x1c]
lea ecx, [esi + 0x40]
push eax
mov byte [ebp - 4], 1
call fcn.0049d9c5
mov eax, dword [ebx]
lea ecx, [ebp - 0x20]
push ecx
push 0x4c1470
push 0
push dword [ebp - 0x10]
push ebx
call dword [eax + 0x14]
push ecx
lea eax, [ebp - 0x1c]
mov ecx, esp
mov dword [ebp - 0x24], esp
push eax
call fcn.0049d64d
push dword [ebp - 0x20]
mov ecx, dword [esi + 0x5c]
call fcn.00402db9
mov dword [ebp - 0x14], eax
push ecx
lea eax, [ebp - 0x1c]
mov ecx, esp
mov dword [ebp - 0x24], esp
push eax
call fcn.0049d64d
mov ecx, dword [ebp - 0x14]
call fcn.00403f06
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x18], 1
push dword [ebp - 0x10]
mov dword [esi + 0x60], eax
mov eax, dword [edi]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
and byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.0049d8d8
xor eax, eax
cmp dword [esi + 0x70], eax
je 0x404146
cmp esi, eax
je 0x404071
mov eax, dword [esi + 0x1c]
lea ecx, [ebp - 0x10]
push ecx
push 0x12
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x404098
mov eax, dword [ebx]
lea ecx, [ebp - 0x12c]
push ecx
push 1
push dword [ebp - 0x10]
push ebx
call dword [eax + 0x2c]
test eax, eax
jge 0x4040c5
mov eax, dword [edi]
push dword [ebp - 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov edi, dword [edi]
push edi
mov eax, dword [edi]
call dword [eax + 8]
mov ecx, esi
call fcn.0049d419
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0049d8d8
xor eax, eax
jmp 0x404177
push dword [ebp - 0x10]
lea eax, [ebp - 0x12c]
mov ecx, esi
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00404628
lea eax, [ebp - 0x14]
lea ecx, [esi + 0x44]
push eax
mov byte [ebp - 4], 2
call fcn.0049d9c5
mov eax, dword [ebx]
lea ecx, [ebp - 0x24]
push ecx
push 0x4c1470
push 0
push dword [ebp - 0x10]
push ebx
call dword [eax + 0x14]
push ecx
lea eax, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.0049d64d
push dword [ebp - 0x24]
mov ecx, dword [esi + 0x5c]
call fcn.00402db9
mov ebx, eax
push ecx
lea eax, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.0049d64d
mov ecx, ebx
call fcn.00403f06
and byte [ebp - 4], 0
mov dword [ebx + 0x18], 8
lea ecx, [ebp - 0x14]
mov dword [esi + 0x64], ebx
call fcn.0049d8d8
mov eax, dword [edi]
push dword [ebp - 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov edi, dword [edi]
push edi
mov eax, dword [edi]
call dword [eax + 8]
mov eax, dword [esi + 0x5c]
push 1
pop edi
mov ecx, esi
mov dword [eax + 0x10], edi
call fcn.0049d419
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0049d8d8
mov eax, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret