Function at 0x40e310
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49e138
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x4bfdd0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 4], 0
mov byte [ebp - 4], 1
mov esi, dword [ebp + 8]
push edi
mov ecx, esi
mov dword [esi], 0
call fcn.0040eae0
test eax, eax
je 0x40e8bb
push 0x4a6221
lea ecx, [ebp - 0x14]
call fcn.004051c0
test edi, edi
push 0
mov byte [ebp - 4], 2
push 0x4a6221
jne 0x40e7b2
lea ecx, [esi + 0x34]
call fcn.00404530
push edi
lea ecx, [esi + 0x28]
push 0x4a6221
call fcn.00404530
lea edi, [ebp - 0x3c]
call fcn.0040da60
push str.Server.HTCFG
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov byte [ebp - 4], 3
call fcn.00405010
add esp, 0xc
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e3d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
push 0xfde9
push 0x3a8
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x38], esp
mov edi, esp
push eax
call fcn.00404650
add esp, 4
lea ecx, [ebp - 0x38]
add eax, 0x10
push ecx
mov dword [edi], eax
call fcn.00415ca0
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call fcn.004044b0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e435
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 4], 1
jle 0x40e44d
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00404a10
mov eax, dword [ebp - 0x1c]
lea ebx, [esi + 0x2a4]
push ebx
push eax
call fcn.004601f0
add esp, 8
test eax, eax
mov dword [esi + 0x2ac], 1
mov esi, dword [ebp + 0xc]
jne 0x40e72a
cmp dword [esi - 4], 1
mov edx, dword [esi - 0xc]
mov dword [ebp - 0x38], edx
jle 0x40e48c
mov eax, edx
push eax
lea ecx, [ebp + 0xc]
call fcn.00404a10
mov esi, dword [ebp + 0xc]
mov edi, dword [ebx]
mov eax, dword [ebp - 0x38]
mov ecx, esi
xor edx, edx
call fcn.00461060
test eax, eax
mov dword [ebp - 0x34], 0
jne 0x40e72a
push str.select__from_svr_cfg
lea ecx, [ebp - 0x14]
call fcn.00404e20
mov eax, dword [ebp - 0x14]
xor esi, esi
cmp dword [eax - 4], 1
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x28], esi
jle 0x40e4d9
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00404a10
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x34]
push edx
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x38]
push edx
mov edx, dword [ebx]
lea ecx, [ebp - 0x24]
push ecx
push eax
push edx
call fcn.00451570
add esp, 0x18
cmp eax, esi
jne 0x40e6ca
mov esi, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
lea ecx, [esi + 0x34]
call fcn.004044b0
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [esi + 0x28]
call fcn.004044b0
lea edx, [ebp - 0x20]
mov dword [esi + 0x2ac], 2
push edx
mov esi, 0x4a6221
call fcn.00404180
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 7
call fcn.00404180
mov byte [ebp - 4], 8
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], 0
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [ebp - 0x38]
jge 0x40e682
xor eax, eax
mov dword [ebp - 0x2c], eax
cmp eax, dword [ebp - 0x28]
jge 0x40e679
mov edx, dword [esi + eax*4]
push edx
push 0x4a6224
lea edi, [ebp - 0x20]
call fcn.004043e0
add esp, 8
cmp dword [esi + ebx*4], 0
mov eax, 0x4a6221
je 0x40e58d
mov eax, dword [esi + ebx*4]
push eax
push 0x4a6224
lea edi, [ebp - 0x18]
call fcn.004043e0
add esp, 8
lea ebx, [ebp - 0x20]
call fcn.00404290
mov edi, eax
call fcn.00404f70
mov eax, dword [eax]
push str.CfgID
push eax
call fcn.00483f37
mov esi, dword [ebp + 8]
add esp, 8
test eax, eax
jne 0x40e5d0
lea eax, [ebp - 0x18]
lea ecx, [esi + 0x1c]
push eax
call fcn.004044b0
lea ebx, [ebp - 0x20]
call fcn.00404290
mov edi, eax
call fcn.00404f70
mov eax, dword [eax]
push str.AuthType
push eax
call fcn.00483f37
add esp, 8
test eax, eax
jne 0x40e5ff
lea edx, [ebp - 0x18]
lea ecx, [esi + 0x2c]
push edx
call fcn.004044b0
lea ebx, [ebp - 0x20]
call fcn.00404290
mov edi, eax
call fcn.00404f70
mov eax, dword [eax]
push str.LicPath
push eax
call fcn.00483f37
add esp, 8
test eax, eax
jne 0x40e62e
lea eax, [ebp - 0x18]
lea ecx, [esi + 0x24]
push eax
call fcn.004044b0
lea ebx, [ebp - 0x20]
call fcn.00404290
mov edi, eax
call fcn.00404f70
mov eax, dword [eax]
push str.LisPort
push eax
call fcn.00483f37
add esp, 8
test eax, eax
jne 0x40e660
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00483c96
add esp, 4
mov dword [esi + 0x3c], eax
mov esi, dword [ebp - 0x24]
mov eax, 1
add dword [ebp - 0x30], eax
add dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x30]
jmp 0x40e562
add dword [ebp - 0x34], 1
jmp 0x40e551
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e6a5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e71b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40e71b
cmp eax, 1
jne 0x40e709
push str.create_table_if_not_exists_Svr_Cfg___t_t_t_t_t_t_t___CfgID________________integer______________primary_key_autoincrement__t_t_t_t_t_t_t___LisPort______________integer______________not_null__t_t_t_t_t_t_t___AuthType_____________text_________________not_null__t_t_t_t_t_t_t___AuthUser_____________text_________________null__t_t_t_t_t_t_t___AuthKey______________text_________________null__t_t_t_t_t_t_t___LicPath______________text_________________not_null_t_t_t_t_t_t_t______t_t_t_t_t_t_t___create_table_if_not_exists_Svr_DBNode___t_t_t_t_t_t_t___NodeID_______________integer______________primary_key_autoincrement__t_t_t_t_t_t_t___NodeName_____________text_________________not_null__t_t_t_t_t_t_t___NodeType_____________text_________________null__t_t_t_t_t_t_t___NodeState____________text_________________null__t_t_t_t_t_t_t___ParentNode___________text_________________null__t_t_t_t_t_t_t___NodeRemark___________text_________________null_t_t_t_t_t_t_t______t_t_t_t_t_t_t___create_table_if_not_exists_Svr_DBSrcCfg___t_t_t_t_t_t_t___DBCfgID______________integer______________primary_key_autoincrement__t_t_t_t_t_t_t___NodeID_______________integer______________not_null__t_t_t_t_t_t_t___ConnName_____________text_________________not_null__t_t_t_t_t_t_t___CfgType______________text_________________null__t_t_t_t_t_t_t___DataType_____________text_________________not_null__t_t_t_t_t_t_t___ConnState____________text_________________null__t_t_t_t_t_t_t___DBMSType_____________text_________________not_null__t_t_t_t_t_t_t___SvrName______________text_________________null__t_t_t_t_t_t_t___SvrAddr______________text_________________null__t_t_t_t_t_t_t___InstName_____________text_________________null__t_t_t_t_t_t_t___DBName_______________text_________________null__t_t_t_t_t_t_t___UserName_____________text_________________null__t_t_t_t_t_t_t___UserPwd______________text_________________null__t_t_t_t_t_t_t___LisPort______________integer______________null__t_t_t_t_t_t_t___ExtParamA____________text_________________null__t_t_t_t_t_t_t___ExtParamB____________text_________________null_t_t_t_t_t_t_t______t_t_t_t_t_t_t___create_table_if_not_exists_Svr_FileList___t_t_t_t_t_t_t___FileID_______________integer______________primary_key_autoincrement__t_t_t_t_t_t_t___ProdID_______________text_t_____________not_null__t_t_t_t_t_t_t___FileName_____________text_________________null__t_t_t_t_t_t_t___FileVer______________text_________________null__t_t_t_t_t_t_t___CreateTime___________text_________________null__t_t_t_t_t_t_t___ModifyTime___________text_________________null__t_t_t_t_t_t_t___FilePath_____________text_________________null__t_t_t_t_t_t_t___TargPath_____________text_________________null__t_t_t_t_t_t_t___How2Place____________text_________________null__t_t_t_t_t_t_t___CRCODE_______________text_________________null_t_t_t_t_t_t_t____
lea ecx, [ebp - 0x14]
call fcn.00404e20
lea ecx, [ebp - 0x14]
call fcn.00404f30
mov edx, dword [ebx]
lea ecx, [ebp - 0x34]
push ecx
push esi
push esi
push eax
push edx
call fcn.004485e0
add esp, 0x14
cmp eax, esi
jne 0x40e71b
mov eax, dword [ebp + 8]
mov dword [eax + 0x2ac], 2
jmp 0x40e71b
cmp eax, 0x1a
je 0x40e71b
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x2ac], 2
mov edx, dword [ebp - 0x24]
push edx
call fcn.00451710
mov esi, dword [ebp + 0xc]
add esp, 4
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x2a4]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e756
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e779
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e79c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea ecx, [esi + 0x38]
call fcn.00404530
mov eax, dword [esi + 0x24]
sub eax, 0x10
push eax
call fcn.00404650
add eax, 0x10
add esp, 4
mov dword [ebp - 0x18], eax
lea ebx, [ebp - 0x18]
mov byte [ebp - 4], 9
call fcn.00404290
mov edi, eax
call fcn.00404f70
mov eax, dword [eax]
push 0x4a6221
push eax
call fcn.00483f37
add esp, 8
test eax, eax
jne 0x40e867
lea edi, [ebp - 0x38]
call fcn.0040da60
push str.HTSM.LIC
push eax
lea ecx, [ebp - 0x3c]
mov bl, 0xa
push ecx
mov byte [ebp - 4], bl
call fcn.00405010
add esp, 0xc
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xb
call fcn.004044b0
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e844
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e867
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40e8ea
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e898
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e8bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eac9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40eac9
mov eax, dword [ebp - 0x18]
push 0xfde9
push 0x3a8
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x3c], esp
mov edi, esp
push eax
call fcn.00404650
add esp, 4
lea ecx, [ebp - 0x3c]
add eax, 0x10
push ecx
mov dword [edi], eax
call fcn.00415ca0
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xc
call fcn.004044b0
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e947
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
cmp dword [eax - 4], 1
jle 0x40e95f
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00404a10
mov eax, dword [ebp - 0x18]
lea ebx, [esi + 0x2a8]
push ebx
push eax
call fcn.004601f0
add esp, 8
test eax, eax
jne 0x40ea37
mov eax, dword [ebp + 0xc]
cmp dword [eax - 4], 1
mov esi, dword [eax - 0xc]
jle 0x40e98e
mov edx, esi
push edx
lea ecx, [ebp + 0xc]
call fcn.00404a10
mov edi, dword [ebx]
mov ecx, dword [ebp + 0xc]
mov eax, esi
xor edx, edx
call fcn.00461060
xor esi, esi
cmp eax, esi
jne 0x40ea37
mov edi, dword [ebp + 8]
push str.SELECT_CustName__FROM_Svr_SoftProtect
lea ecx, [ebp - 0x14]
mov dword [edi + 0x2b0], 1
call fcn.00404e20
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x38], esi
mov dword [ebp + 8], esi
call fcn.00404f30
push esi
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x38]
push edx
mov edx, dword [ebx]
lea ecx, [ebp + 8]
push ecx
push eax
push edx
call fcn.00451570
add esp, 0x18
cmp eax, esi
jne 0x40ea2b
cmp dword [ebp - 0x38], esi
jle 0x40ea2b
lea eax, [ebp + 0xc]
push eax
lea ecx, [edi + 0x38]
call fcn.004044b0
mov esi, dword [ebp + 8]
mov dword [edi + 0x2b0], 2
cmp dword [esi + 4], 0
mov eax, 0x4a6221
je 0x40ea17
mov eax, dword [esi + 4]
push eax
push 0x4a6224
add edi, 0x20
push edi
call fcn.004051a0
add esp, 0xc
jmp 0x40ea2e
mov esi, dword [ebp + 8]
push esi
call fcn.00451710
add esp, 4
mov ebx, dword [ebx]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea5c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eaa5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8