Function at 0x40af80
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42cdbd
mov eax, dword fs:[0]
push eax
sub esp, 0x6b4
mov eax, dword [0x43a00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x6b8]
call fcn.00409890
lea ecx, [ebp - 0x670]
mov dword [ebp - 4], 0
call fcn.00409a10
mov byte [ebp - 4], 1
cmp dword [0x43ba80], 0
je 0x40b071
lea ecx, [ebp - 0x658]
call fcn.004011a0
cmp dword [ebp - 0x65c], 0x10
lea ecx, [ebp - 0x670]
lea edx, [ebp - 0x6b8]
cmovae ecx, dword [ebp - 0x670]
cmp dword [ebp - 0x6a4], 0x10
cmovae edx, dword [ebp - 0x6b8]
cmp dword [eax + 0x14], 0x10
jb 0x40b017
mov eax, dword [eax]
push ecx
push edx
push 0x1df
push str.D:qianliu_agentworkspace0mq_gitlab7538NetProxyInstCaByodProxyInstCa.cpp
push eax
push str._ERROR___s__s:_d_tstrTmCertPath_s__strTmKeyPath_s_n
push dword [0x43ba80]
call fcn.00402120
mov edx, dword [ebp - 0x644]
add esp, 0x1c
cmp edx, 0x10
jb 0x40b071
mov ecx, dword [ebp - 0x658]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b067
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b766
push edx
push ecx
call fcn.0040f6ee
add esp, 8
push 0x104
lea eax, [ebp - 0x118]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push 0x104
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.004136c0
add esp, 0xc
lea eax, [ebp - 0x118]
push str...configlocal
push eax
push str._s_soldcert
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.0040cf00
lea ecx, [ebp - 0x220]
add esp, 0x14
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b0d6
sub ecx, edx
jne 0x40b158
cmp dword [0x43ba80], ecx
je 0x40b635
lea ecx, [ebp - 0x658]
call fcn.004011a0
cmp dword [eax + 0x14], 0x10
jb 0x40b100
mov eax, dword [eax]
push 0x1eb
push str.D:qianliu_agentworkspace0mq_gitlab7538NetProxyInstCaByodProxyInstCa.cpp
push eax
push str._ERROR___s__s:_d_tstrlen_oldConfigDir__is_zero_n
push dword [0x43ba80]
call fcn.00402120
add esp, 0x14
mov edx, dword [ebp - 0x644]
cmp edx, 0x10
jb 0x40b635
mov ecx, dword [ebp - 0x658]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b1d2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
jmp 0x40b1d2
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea eax, [ebp - 0x220]
push eax
call esi
test eax, eax
jne 0x40b1e1
push eax
lea eax, [ebp - 0x220]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
test eax, eax
je 0x40b1e1
cmp dword [0x43ba80], 0
je 0x40b635
lea ecx, [ebp - 0x658]
call fcn.004011a0
mov esi, eax
cmp dword [esi + 0x14], 0x10
jb 0x40b1a1
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x220]
push eax
push 0x1f2
push str.D:qianliu_agentworkspace0mq_gitlab7538NetProxyInstCaByodProxyInstCa.cpp
push esi
push str._ERROR___s__s:_d_tCreateDirectory__s_Failed__lasterror_u_n
push dword [0x43ba80]
call fcn.00402120
add esp, 0x1c
jmp 0x40b11e
push edx
push ecx
call fcn.0040f6ee
add esp, 8
jmp 0x40b635
cmp dword [ebp - 0x6a4], 0x10
lea eax, [ebp - 0x6b8]
cmovae eax, dword [ebp - 0x6b8]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
test eax, eax
je 0x40b6e0
cmp dword [ebp - 0x65c], 0x10
lea eax, [ebp - 0x670]
cmovae eax, dword [ebp - 0x670]
push eax
call esi
test eax, eax
je 0x40b6e0
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x328]
push eax
call ebx
push 0x43648c
lea eax, [ebp - 0x328]
push eax
call edi
push str...configlocaloldcert_tsp_root_cert.pem
lea eax, [ebp - 0x328]
push eax
call edi
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x430]
push eax
call ebx
push 0x43648c
lea eax, [ebp - 0x430]
push eax
call edi
push str...configlocaloldcert_tsp_root_key.pem
lea eax, [ebp - 0x430]
push eax
call edi
lea ecx, [ebp - 0x328]
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x644], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x658], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b2a7
sub ecx, edx
lea eax, [ebp - 0x328]
push ecx
push eax
lea ecx, [ebp - 0x658]
call fcn.004022a0
lea edx, [ebp - 0x658]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x6b8]
call fcn.0040adf0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x644]
cmp edx, 0x10
jb 0x40b316
mov ecx, dword [ebp - 0x658]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b30c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
push edx
push ecx
call fcn.0040f6ee
add esp, 8
lea ecx, [ebp - 0x430]
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x644], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x658], 0
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b340
sub ecx, edx
lea eax, [ebp - 0x430]
push ecx
push eax
lea ecx, [ebp - 0x658]
call fcn.004022a0
lea edx, [ebp - 0x658]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x670]
call fcn.0040adf0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x644]
cmp edx, 0x10
jb 0x40b3af
mov ecx, dword [ebp - 0x658]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b3a5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
push edx
push ecx
call fcn.0040f6ee
add esp, 8
lea ecx, [ebp - 0x6a0]
call fcn.00409b90
lea ecx, [ebp - 0x688]
mov byte [ebp - 4], 4
call fcn.00409d10
mov byte [ebp - 4], 5
lea eax, [ebp - 0x6a0]
cmp dword [ebp - 0x68c], 0x10
cmovae eax, dword [ebp - 0x6a0]
push eax
call esi
test eax, eax
je 0x40b723
cmp dword [ebp - 0x674], 0x10
lea eax, [ebp - 0x688]
cmovae eax, dword [ebp - 0x688]
push eax
call esi
test eax, eax
je 0x40b723
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x538]
push eax
call ebx
push 0x43648c
lea eax, [ebp - 0x538]
push eax
call edi
push str...configlocaloldcert_tsp_illg_cert.pem
lea eax, [ebp - 0x538]
push eax
call edi
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x640]
push eax
call ebx
push 0x43648c
lea eax, [ebp - 0x640]
push eax
call edi
push str...configlocaloldcert_tsp_illg_key.pem
lea eax, [ebp - 0x640]
push eax
call edi
lea ecx, [ebp - 0x538]
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x644], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x658], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b487
sub ecx, edx
lea eax, [ebp - 0x538]
push ecx
push eax
lea ecx, [ebp - 0x658]
call fcn.004022a0
lea edx, [ebp - 0x658]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x6a0]
call fcn.0040adf0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x644]
cmp edx, 0x10
jb 0x40b4f6
mov ecx, dword [ebp - 0x658]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b4ec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
push edx
push ecx
call fcn.0040f6ee
add esp, 8
lea ecx, [ebp - 0x640]
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x644], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x658], 0
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b520
sub ecx, edx
lea eax, [ebp - 0x640]
push ecx
push eax
lea ecx, [ebp - 0x658]
call fcn.004022a0
lea edx, [ebp - 0x658]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x688]
call fcn.0040adf0
mov edx, dword [ebp - 0x644]
cmp edx, 0x10
jb 0x40b58b
mov ecx, dword [ebp - 0x658]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b581
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
push edx
push ecx
call fcn.0040f6ee
add esp, 8
mov edx, dword [ebp - 0x674]
cmp edx, 0x10
jb 0x40b5c5
mov ecx, dword [ebp - 0x688]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b5bb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
push edx
push ecx
call fcn.0040f6ee
add esp, 8
mov edx, dword [ebp - 0x68c]
mov dword [ebp - 0x678], 0
mov dword [ebp - 0x674], 0xf
mov byte [ebp - 0x688], 0
cmp edx, 0x10
jb 0x40b61a
mov ecx, dword [ebp - 0x6a0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b610
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
push edx
push ecx
call fcn.0040f6ee
add esp, 8
mov dword [ebp - 0x690], 0
mov dword [ebp - 0x68c], 0xf
mov byte [ebp - 0x6a0], 0
mov edx, dword [ebp - 0x65c]
cmp edx, 0x10
jb 0x40b66f
mov ecx, dword [ebp - 0x670]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b665
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
push edx
push ecx
call fcn.0040f6ee
add esp, 8
mov edx, dword [ebp - 0x6a4]
mov dword [ebp - 0x660], 0
mov dword [ebp - 0x65c], 0xf
mov byte [ebp - 0x670], 0
cmp edx, 0x10
jb 0x40b6c4
mov ecx, dword [ebp - 0x6b8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b6ba
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b76b
push edx
push ecx
call fcn.0040f6ee
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040f469
mov esp, ebp
pop ebp
ret
cmp dword [0x43ba80], 0
je 0x40b3af
lea ecx, [ebp - 0x658]
call fcn.004011a0
cmp dword [eax + 0x14], 0x10
jb 0x40b700
mov eax, dword [eax]
push 0x1fa
push str.D:qianliu_agentworkspace0mq_gitlab7538NetProxyInstCaByodProxyInstCa.cpp
push eax
push str._ERROR___s__s:_d_tstrTmCertPath_or_strTmKeyPath_not_exist_n
push dword [0x43ba80]
call fcn.00402120
add esp, 0x14
jmp 0x40b375
cmp dword [0x43ba80], 0
je 0x40b58b
lea ecx, [ebp - 0x658]
call fcn.004011a0
cmp dword [eax + 0x14], 0x10
jb 0x40b743
mov eax, dword [eax]
push 0x210
push str.D:qianliu_agentworkspace0mq_gitlab7538NetProxyInstCaByodProxyInstCa.cpp
push eax
push str._ERROR___s__s:_d_tstrTmIllegCertPath_or_strTmIllegKeyPath_not_exist_n
push dword [0x43ba80]
call fcn.00402120
add esp, 0x14
jmp 0x40b551
call fcn.00415003
call fcn.00415003
int3