Function at 0x40c020
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x17830
call fcn.00519540
mov eax, dword [0x594ca8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x20], 0
mov dword [ebp - 0x17810], edi
jne 0x40c4e7
cmp dword [edi + 0x30], 0
jne 0x40c4e7
push 0x3ff
lea eax, [ebp - 0x403]
push 0
push eax
mov byte [ebp - 0x404], 0
call fcn.00518f10
add esp, 0xc
push 1
push 0x1c
lea ecx, [ebp - 0x404]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea esi, [ebp - 0x1780c]
call fcn.00401f10
mov esi, dword [edi + 0x28]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x1780c], 0x544547
test esi, esi
jne 0x40c0b4
mov dword [ebp - 0x1781c], 0
jmp 0x40c0e7
push esi
call ebx
inc eax
cmp eax, 0x3fffffff
jle 0x40c0cb
mov dword [ebp - 0x1781c], 0
jmp 0x40c0e7
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b8f0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.00403b60
mov dword [ebp - 0x1781c], eax
mov edx, dword [ebp - 0x17810]
mov edi, dword [edx + 0x24]
xor esi, esi
cmp edi, esi
jne 0x40c0fe
mov dword [ebp - 0x17824], esi
jmp 0x40c12f
push edi
call ebx
inc eax
cmp eax, 0x3fffffff
jle 0x40c111
mov dword [ebp - 0x17824], esi
jmp 0x40c12f
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov dword [ebp - 0x17824], eax
xor esi, esi
mov eax, dword [ebp - 0x17810]
mov edi, dword [eax + 0x1c]
cmp edi, esi
jne 0x40c144
mov dword [ebp - 0x1782c], esi
jmp 0x40c175
push edi
call ebx
inc eax
cmp eax, 0x3fffffff
jle 0x40c157
mov dword [ebp - 0x1782c], esi
jmp 0x40c175
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov dword [ebp - 0x1782c], eax
xor esi, esi
mov ecx, dword [ebp - 0x17810]
mov edi, dword [ecx + 0x18]
cmp edi, esi
jne 0x40c18a
mov dword [ebp - 0x17828], esi
jmp 0x40c1bb
push edi
call ebx
inc eax
cmp eax, 0x3fffffff
jle 0x40c19d
mov dword [ebp - 0x17828], esi
jmp 0x40c1bb
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov dword [ebp - 0x17828], eax
xor esi, esi
mov edx, dword [ebp - 0x17810]
mov edi, dword [edx + 0x10]
cmp edi, esi
jne 0x40c1d0
mov dword [ebp - 0x17820], esi
jmp 0x40c201
push edi
call ebx
inc eax
cmp eax, 0x3fffffff
jle 0x40c1e3
mov dword [ebp - 0x17820], esi
jmp 0x40c201
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov dword [ebp - 0x17820], eax
xor esi, esi
mov eax, dword [ebp - 0x17810]
mov edi, dword [eax + 0xc]
cmp edi, esi
jne 0x40c216
mov dword [ebp - 0x17818], esi
jmp 0x40c247
push edi
call ebx
inc eax
cmp eax, 0x3fffffff
jle 0x40c229
mov dword [ebp - 0x17818], esi
jmp 0x40c247
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov dword [ebp - 0x17818], eax
xor esi, esi
mov ecx, dword [ebp - 0x17810]
mov edi, dword [ecx + 8]
cmp edi, esi
jne 0x40c25c
mov dword [ebp - 0x17814], esi
jmp 0x40c28d
push edi
call ebx
inc eax
cmp eax, 0x3fffffff
jle 0x40c26f
mov dword [ebp - 0x17814], esi
jmp 0x40c28d
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov dword [ebp - 0x17814], eax
xor esi, esi
mov edx, dword [ebp - 0x17810]
mov edi, dword [edx + 4]
cmp edi, esi
jne 0x40c29e
xor ebx, ebx
jmp 0x40c2c5
push edi
call ebx
inc eax
cmp eax, 0x3fffffff
jle 0x40c2ad
xor ebx, ebx
jmp 0x40c2c5
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov ebx, eax
mov eax, dword [ebp - 0x17810]
mov edi, dword [eax]
test edi, edi
jne 0x40c2d5
xor eax, eax
jmp 0x40c2fe
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40c2e8
xor eax, eax
jmp 0x40c2fe
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov ecx, dword [ebp - 0x1781c]
mov edx, dword [ebp - 0x17824]
mov esi, dword [ebp - 0x17810]
push ecx
mov ecx, dword [esi + 0x20]
push edx
mov edx, dword [ebp - 0x1782c]
push ecx
mov ecx, dword [ebp - 0x17828]
push edx
mov edx, dword [esi + 0x14]
push ecx
mov ecx, dword [ebp - 0x17820]
push edx
mov edx, dword [ebp - 0x17818]
push ecx
mov ecx, dword [ebp - 0x17814]
push edx
push ecx
push ebx
push eax
lea edx, [ebp - 0x1740c]
push str.http:__trace.m1905.cn_pcclient__m_sa_sos_sdid_sappid_sverid_dpid_scid_sstep_dposid_surl_s
push edx
call fcn.00515f66
mov esi, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0x34
test esi, esi
jne 0x40c368
mov dword [ebp - 0x17814], esi
jmp 0x40c3a1
push esi
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40c37f
mov dword [ebp - 0x17814], 0
jmp 0x40c3a1
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b8f0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.00403b60
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x17814], eax
push 0x570678
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40c3b4
xor ebx, ebx
jmp 0x40c3d0
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push 0x570678
push eax
call fcn.00403b60
mov ebx, eax
push str.1905Cache1
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40c3e3
xor eax, eax
jmp 0x40c3fd
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push str.1905Cache1
push eax
call fcn.00403b60
mov ecx, dword [ebp - 0x17814]
push ecx
push ebx
push eax
lea edx, [ebp - 0x404]
push edx
push str._s_s_sTongji_s.xml
lea eax, [ebp - 0x1240c]
push 0x2800
push eax
call fcn.00515fea
mov eax, dword [ebp - 0x17810]
mov esi, dword [eax]
mov ecx, dword [eax + 0x2c]
add esp, 0x1c
mov dword [ebp - 0xd40c], ecx
mov dword [ebp - 0xd408], 0x402
test esi, esi
jne 0x40c449
xor ebx, ebx
jmp 0x40c470
push esi
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40c458
xor ebx, ebx
jmp 0x40c470
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b8f0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.00403b60
mov ebx, eax
mov edx, dword [ebp - 0x17810]
mov edi, dword [edx]
test edi, edi
je 0x40c48b
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40c48f
xor eax, eax
jmp 0x40c4a5
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
lea ecx, [ebp - 0x1240c]
push ecx
push ebx
push eax
push 0x16
lea edx, [ebp - 0xd404]
push str.type_dm_s_a_s_saveFile_s
push edx
call fcn.00515f66
add esp, 0x18
mov eax, 0xcc08
lea esi, [ebp - 0x1780c]
call fcn.00519540
mov edi, esp
mov ecx, 0x3302
rep movsd dword es:[edi], dword [esi]
call fcn.00401750
jmp 0x40cafb
push 0x3ff
lea eax, [ebp - 0x403]
push 0
push eax
mov byte [ebp - 0x404], 0
call fcn.00518f10
push 0x3ff
lea ecx, [ebp - 0xc03]
push 0
push ecx
mov byte [ebp - 0xc04], 0
call fcn.00518f10
push 0x27ff
lea edx, [ebp - 0x3403]
push 0
push edx
mov byte [ebp - 0x3404], 0
call fcn.00518f10
push 0x27ff
lea eax, [ebp - 0xac03]
push 0
push eax
mov byte [ebp - 0xac04], 0
call fcn.00518f10
push 0x27ff
lea ecx, [ebp - 0x5c03]
push 0
push ecx
mov byte [ebp - 0x5c04], 0
call fcn.00518f10
push 0x27ff
lea edx, [ebp - 0x8403]
push 0
push edx
mov byte [ebp - 0x8404], 0
call fcn.00518f10
add esp, 0x48
push 0x3ff
lea eax, [ebp - 0x803]
push 0
push eax
mov byte [ebp - 0x804], 0
call fcn.00518f10
add esp, 0xc
push 1
push 0x1c
lea ecx, [ebp - 0x404]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov esi, dword [edi + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
test esi, esi
jne 0x40c5cf
mov dword [ebp - 0x17814], 0
jmp 0x40c616
push esi
call ebx
inc eax
cmp eax, 0x3fffffff
jg 0x40c608
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov edi, esp
test edi, edi
je 0x40c608
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push esi
push 0
push 3
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, edi
jmp 0x40c60a
xor eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x17814], eax
push 0x570678
call ebx
inc eax
cmp eax, 0x3fffffff
jg 0x40c659
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov edi, esp
test edi, edi
je 0x40c659
push 0
push 0
push esi
push edi
push 0xffffffffffffffff
push 0x570678
push 0
push 3
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
neg esi
sbb esi, esi
and esi, edi
jmp 0x40c65b
xor esi, esi
push str.1905Cache1
call ebx
inc eax
cmp eax, 0x3fffffff
jg 0x40c69c
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov edi, esp
test edi, edi
je 0x40c69c
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push str.1905Cache1
push 0
push 3
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, edi
jmp 0x40c69e
xor eax, eax
mov edx, dword [ebp - 0x17814]
push edx
push esi
push eax
lea eax, [ebp - 0x404]
push eax
push str._s_s_sTongji_s.xml
lea ecx, [ebp - 0x8404]
push 0x2800
push ecx
call fcn.00515fea
mov ecx, dword [ebp - 0x17810]
mov edi, dword [ecx + 0x28]
add esp, 0x1c
mov dword [ebp - 0xc04], 0x544547
test edi, edi
jne 0x40c6e6
mov dword [ebp - 0x17814], edi
jmp 0x40c731
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c723
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c723
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c725
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov dword [ebp - 0x17814], eax
mov edi, dword [ecx + 0x24]
test edi, edi
jne 0x40c740
mov dword [ebp - 0x17818], edi
jmp 0x40c78b
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c77d
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c77d
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c77f
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov dword [ebp - 0x17818], eax
mov edi, dword [ecx + 0x1c]
test edi, edi
jne 0x40c79a
mov dword [ebp - 0x17820], edi
jmp 0x40c7e5
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c7d7
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c7d7
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c7d9
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov dword [ebp - 0x17820], eax
mov edi, dword [ecx + 0x18]
test edi, edi
jne 0x40c7f4
mov dword [ebp - 0x17828], edi
jmp 0x40c83f
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c831
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c831
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c833
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov dword [ebp - 0x17828], eax
mov edi, dword [ecx + 0x10]
test edi, edi
jne 0x40c84e
mov dword [ebp - 0x1782c], edi
jmp 0x40c899
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c88b
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c88b
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c88d
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov dword [ebp - 0x1782c], eax
mov edi, dword [ecx + 0xc]
test edi, edi
jne 0x40c8a8
mov dword [ebp - 0x17824], edi
jmp 0x40c8f3
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c8e5
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c8e5
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c8e7
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov dword [ebp - 0x17824], eax
mov edi, dword [ecx + 8]
test edi, edi
jne 0x40c902
mov dword [ebp - 0x1781c], edi
jmp 0x40c94d
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c93f
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c93f
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c941
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov dword [ebp - 0x1781c], eax
mov edi, dword [ecx + 4]
test edi, edi
jne 0x40c95c
mov dword [ebp - 0x17830], edi
jmp 0x40c9a7
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c999
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c999
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c99b
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov dword [ebp - 0x17830], eax
mov edi, dword [ecx]
test edi, edi
jne 0x40c9b1
xor eax, eax
jmp 0x40c9f6
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40c9ee
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40c9ee
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40c9f0
xor eax, eax
mov ecx, dword [ebp - 0x17810]
mov edx, dword [ebp - 0x17814]
push edx
mov edx, dword [ebp - 0x17818]
push edx
mov edx, dword [ecx + 0x20]
mov ecx, dword [ecx + 0x14]
push edx
mov edx, dword [ebp - 0x17820]
push edx
mov edx, dword [ebp - 0x17828]
push edx
mov edx, dword [ebp - 0x1782c]
push ecx
mov ecx, dword [ebp - 0x17824]
push edx
mov edx, dword [ebp - 0x1781c]
push ecx
mov ecx, dword [ebp - 0x17830]
push edx
push ecx
push eax
lea edx, [ebp - 0xac04]
push str.http:__trace.m1905.cn_pcclient__m_sa_sos_sdid_sappid_sverid_dpid_scid_sstep_dposid_surl_s
push edx
call fcn.00515f66
lea eax, [ebp - 0xac04]
push str.http:__
push eax
call fcn.00516010
add esp, 0x3c
test eax, eax
je 0x40ca65
add eax, 7
jmp 0x40ca6b
lea eax, [ebp - 0xac04]
mov dl, byte [eax]
xor ecx, ecx
test dl, dl
je 0x40ca81
cmp dl, 0x2f
je 0x40ca81
mov dl, byte [ecx + eax + 1]
inc ecx
test dl, dl
jne 0x40ca73
push ecx
push eax
lea ecx, [ebp - 0x804]
push ecx
call fcn.005160a0
lea edx, [ebp - 0xac04]
push str.http:__
push edx
call fcn.00516010
add esp, 0x14
test eax, eax
je 0x40caac
add eax, 7
jmp 0x40cab2
lea eax, [ebp - 0xac04]
push 0x5704d4
push eax
call fcn.00516010
lea edx, [ebp - 0x5c04]
add esp, 8
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x40cac8
lea eax, [ebp - 0x8404]
push eax
lea ecx, [ebp - 0x5c04]
push ecx
lea edx, [ebp - 0x804]
push edx
lea ecx, [ebp - 0x3404]
lea edx, [ebp - 0xc04]
call fcn.00402070
add esp, 0xc
lea esp, [ebp - 0x1783c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005155a4
mov esp, ebp
pop ebp
ret