Function at 0x1039f89
Capabilities:
Get common file path

Disassembly:
push 0x420
mov eax, 0x106b287
call fcn.0101da7e
mov eax, dword [0x1077004]
mov ebx, 0x1077004
cmp eax, ebx
je 0x1039fc7
test dword [eax + 0x1c], 0x100
je 0x1039fc7
cmp byte [eax + 0x19], 4
jb 0x1039fc7
push 0x100a2b8
push 0x34
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01015bb9
lea ecx, [ebp - 0x428]
call sub.MFC42u.dll_CString::CString_3
xor eax, eax
mov esi, 0x206
xor edi, edi
push esi
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push edi
push eax
mov dword [ebp - 4], edi
call sub.msvcrt.dll_memset
xor eax, eax
push esi
mov word [ebp - 0x424], ax
lea eax, [ebp - 0x422]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
mov byte [ebp - 4], 1
call sub.MFC42u.dll_AfxGetModuleState
mov ecx, dword [eax + 4]
push 0x100a78c
push 0x1006f78
push 0x100a780
lea eax, [ebp - 0x42c]
push eax
call sub.MFC42u.dll_CWinApp::GetProfileStringW
push eax
lea ecx, [ebp - 0x428]
mov byte [ebp - 4], 2
call fcn.0101d3fa
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 1
call sub.MFC42u.dll_CString::CString
mov esi, 0x104
push esi
lea eax, [ebp - 0x21c]
push eax
push 5
mov dword [ebp - 4], edi
call fcn.01022068
test eax, eax
jne 0x103a0ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x1077004]
cmp ecx, ebx
je 0x103a0a5
test dword [ecx + 0x1c], 0x100
je 0x103a0a5
cmp byte [ecx + 0x19], 2
jb 0x103a0a5
push eax
push 0x1006f28
push 0x100a2b8
push 0x36
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0101ea0b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x428]
call sub.MFC42u.dll_CString::CString
call fcn.0101dae9
ret
lea eax, [ebp - 0x21c]
mov ebx, 0x1079b90
push eax
mov ecx, ebx
mov byte [ebp - 4], 4
call fcn.0101cb36
mov eax, dword [ebp - 0x428]
cmp dword [eax - 8], edi
jle 0x103a0e1
movzx ecx, word [eax]
jmp 0x103a0e3
xor ecx, ecx
push 0x5c
pop edx
cmp dx, cx
je 0x103a0f9
push edx
mov ecx, ebx
call sub.MFC42u.dll_CString::operator_2
mov eax, dword [ebp - 0x428]
push eax
push esi
lea eax, [ebp - 0x21c]
push eax
call fcn.0101f089
cmp eax, edi
jge 0x103a13e
mov ecx, dword [0x1077004]
cmp ecx, 0x1077004
je 0x103a0a5
test dword [ecx + 0x1c], 0x100
je 0x103a0a5
cmp byte [ecx + 0x19], 2
jb 0x103a0a5
push eax
push 0x1006ef0
push 0x100a2b8
push 0x37
jmp 0x103a09a
lea eax, [ebp - 0x21c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x103a147
sub eax, edx
push 0x5c
sar eax, 1
pop ecx
cmp cx, word [ebp + eax*2 - 0x21e]
jne 0x103a183
lea eax, [ebp - 0x21c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x103a16b
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [ebp + eax*2 - 0x21e], cx
lea eax, [ebp - 0x21c]
push eax
mov ecx, ebx
call sub.MFC42u.dll_CString::operator_1
lea eax, [ebp - 0x424]
push eax
push 0x100a78c
push edi
push edi
push 0x8005
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
cmp eax, edi
jl 0x103a276
push 0xe105
push 0x1006eb0
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.SHELL32.dll_SHSetLocalizedName]
cmp eax, edi
jge 0x103a222
mov ecx, eax
and ecx, 0x1fff0000
cmp ecx, 0x70000
movzx ecx, ax
je 0x103a1e3
mov ecx, eax
mov eax, dword [0x1077004]
cmp eax, 0x1077004
je 0x103a0a5
test dword [eax + 0x1c], 0x100
je 0x103a0a5
cmp byte [eax + 0x19], 2
jb 0x103a0a5
push ecx
push 0x100a738
push 0x100a2b8
push 0x39
push dword [eax + 0x14]
push dword [eax + 0x10]
jmp 0x103a0a0
push dword [0x1079b90]
call fcn.0102177d
test eax, eax
jne 0x103a0a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x1077004]
cmp ecx, 0x1077004
je 0x103a0a5
test dword [ecx + 0x1c], 0x100
je 0x103a0a5
cmp byte [ecx + 0x19], 2
jb 0x103a0a5
push eax
push 0x10091dc
push 0x100a2b8
push 0x3a
jmp 0x103a09a
mov ecx, eax
and ecx, 0x1fff0000
cmp ecx, 0x70000
movzx ecx, ax
je 0x103a28b
mov ecx, eax
mov eax, dword [0x1077004]
cmp eax, 0x1077004
je 0x103a0a5
test dword [eax + 0x1c], 0x100
je 0x103a0a5
cmp byte [eax + 0x19], 2
jb 0x103a0a5
push ecx
push 0x100a6e0
push 0x100a2b8
push 0x3b
jmp 0x103a217