Function at 0x40e8e0
Capabilities:
Check if file exists
Create directory
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46bb71
mov eax, dword fs:[0]
push eax
mov eax, 0x15ec
call fcn.004391d0
mov eax, dword [0x48f244]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x15e0], ecx
push 0x105
lea eax, [ebp - 0x118]
mov dword [ebp - 0x15d4], 0
push 0
push eax
call fcn.00444b80
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x118]
push str.logtrace
push eax
call esi
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40e97c
push eax
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str.ext.ini
lea eax, [ebp - 0x118]
push eax
call esi
push 0x400
lea eax, [ebp - 0x518]
push 0
push eax
call fcn.00444b80
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x118]
add esp, 0xc
push eax
push 0x400
lea eax, [ebp - 0x518]
push eax
push 0x4837fa
push 0x483e18
push str.main
call edi
call fcn.0040cb30
add eax, 0x94
lea ecx, [ebp - 0x1564]
push eax
call fcn.0040c740
mov dword [ebp - 4], 0
lea edx, [ebp - 0x1564]
cmp byte [ebp - 0x518], 0
push ecx
push dword [ebp - 0x1554]
je 0x40eaa1
cmp dword [ebp - 0x1550], 0x10
lea ecx, [ebp - 0x1534]
cmovae edx, dword [ebp - 0x1564]
call fcn.00414510
add esp, 4
mov byte [ebp - 4], 1
lea edx, [ebp - 0x518]
lea ecx, [ebp - 0x1594]
push 0xffffffffffffffff
call fcn.00414510
add esp, 8
mov dword [ebp - 0x15d0], 0xe
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1534]
cmp dword [ebp - 0x1520], 8
lea eax, [ebp - 0x1594]
cmovae ecx, dword [ebp - 0x1534]
cmp dword [ebp - 0x1580], 8
push ecx
cmovae eax, dword [ebp - 0x1594]
push eax
push str.update_dll__localmd5_ls__servermd5_ls
call fcn.00410320
push eax
call fcn.00410410
add esp, 0x10
lea ecx, [ebp - 0x1594]
call fcn.004054a0
lea ecx, [ebp - 0x1534]
mov byte [ebp - 4], 0
call fcn.004054a0
jmp 0x40ebc6
cmp dword [ebp - 0x1550], 0x10
lea ecx, [ebp - 0x154c]
cmovae edx, dword [ebp - 0x1564]
call fcn.00414510
add esp, 4
mov byte [ebp - 4], 3
lea edx, [ebp - 0x518]
lea ecx, [ebp - 0x1534]
push 0xffffffffffffffff
call fcn.00414510
add esp, 8
mov dword [ebp - 0x15d0], 0x70
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x154c]
cmp dword [ebp - 0x1538], 8
lea eax, [ebp - 0x1534]
cmovae ecx, dword [ebp - 0x154c]
cmp dword [ebp - 0x1520], 8
push ecx
cmovae eax, dword [ebp - 0x1534]
push eax
push str.down_dll__localmd5_ls__servermd5_ls
call fcn.00410320
push eax
call fcn.00410410
mov byte [ebp - 4], 3
add esp, 0x10
mov edx, dword [ebp - 0x1520]
cmp edx, 8
jb 0x40eb66
mov ecx, dword [ebp - 0x1534]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40eb5c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f486
push edx
push ecx
call fcn.00439095
add esp, 8
xor eax, eax
mov dword [ebp - 0x1524], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x1538]
mov dword [ebp - 0x1520], 7
mov word [ebp - 0x1534], ax
cmp edx, 8
jb 0x40ebc6
mov ecx, dword [ebp - 0x154c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ebbc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f486
push edx
push ecx
call fcn.00439095
add esp, 8
lea edx, [ebp - 0x518]
lea ecx, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x40ebd0
mov esi, dword [ebp - 0x1554]
sub edx, ecx
cmp dword [ebp - 0x1550], 0x10
lea ecx, [ebp - 0x1564]
cmovae ecx, dword [ebp - 0x1564]
cmp esi, edx
jne 0x40ee1d
lea edx, [ebp - 0x518]
sub esi, 4
jb 0x40ec17
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40ec1c
add ecx, 4
add edx, 4
sub esi, 4
jae 0x40ec06
cmp esi, 0xfffffffc
je 0x40ec50
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40ec49
cmp esi, 0xfffffffd
je 0x40ec50
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x40ec49
cmp esi, 0xfffffffe
je 0x40ec50
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x40ec49
cmp esi, 0xffffffff
je 0x40ec50
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x40ec50
sbb eax, eax
or eax, 1
jmp 0x40ec52
xor eax, eax
test eax, eax
jne 0x40ee1d
push 0x400
push eax
lea eax, [ebp - 0x918]
push eax
call fcn.00444b80
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
push 0x400
lea eax, [ebp - 0x918]
push eax
push 0x4837fa
push str.last
push str.main
call edi
cmp byte [ebp - 0x918], 0
je 0x40ed87
call fcn.0040cb30
lea ecx, [ebp - 0x918]
lea edx, [ecx + 1]
mov eax, dword [eax + 0xac]
mov dword [ebp - 0x154c], 0
mov dword [ebp - 0x151c], eax
mov dword [ebp - 0x153c], 0
mov dword [ebp - 0x1538], 0xf
mov byte [ebp - 0x154c], 0
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ece0
sub ecx, edx
lea eax, [ebp - 0x918]
push ecx
push eax
lea ecx, [ebp - 0x154c]
call fcn.00405800
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x15d0]
or eax, 1
mov dword [ebp - 0x15d0], eax
mov dword [ebp - 0x15d4], eax
call fcn.00448918
cmp dword [ebp - 0x1538], 0x10
lea esi, [ebp - 0x154c]
mov edi, eax
lea eax, [ebp - 0x15c8]
cmovae esi, dword [ebp - 0x154c]
push 0xa
push eax
push esi
mov dword [edi], 0
call fcn.00454303
add esp, 0xc
cmp esi, dword [ebp - 0x15c8]
je 0x40f48b
cmp dword [edi], 0x22
je 0x40f495
mov dword [ebp - 0x15dc], eax
lea eax, [ebp - 0x151c]
push eax
lea eax, [ebp - 0x15dc]
mov dword [ebp - 0x15d8], edx
push eax
call fcn.0040f4c0
mov byte [ebp - 0x15c9], 1
test al, al
jne 0x40ed8e
mov byte [ebp - 0x15c9], 0
mov dword [ebp - 4], 0
test byte [ebp - 0x15d0], 1
je 0x40edd8
mov edx, dword [ebp - 0x1538]
cmp edx, 0x10
jb 0x40edd8
mov ecx, dword [ebp - 0x154c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40edce
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f49f
push edx
push ecx
call fcn.00439095
add esp, 8
cmp byte [ebp - 0x15c9], 0
je 0x40edfb
call fcn.00410320
push 0x483b3c
push str.dll_request_internal_is_pass___ls
push eax
call fcn.00410410
add esp, 0xc
jmp 0x40ee30
push 0x483b48
push str.dll_request_internal_is_pass___ls
call fcn.00410320
push eax
call fcn.00410410
add esp, 0xc
mov edi, 4
jmp 0x40eeef
push str.update_dll__need
call fcn.00410320
push eax
call fcn.00410410
add esp, 8
push str.start_down_dll
call fcn.00410320
push eax
call fcn.00410410
add esp, 8
call fcn.0040cb30
cmp dword [eax + 0x90], 0x10
lea edx, [eax + 0x7c]
jb 0x40ee57
mov edx, dword [eax + 0x7c]
push ecx
push dword [eax + 0x8c]
lea ecx, [ebp - 0x1594]
call fcn.00414510
add esp, 8
mov byte [ebp - 4], 6
cmp dword [ebp - 0x1584], 0
je 0x40eedf
mov dword [ebp - 0x15a0], 0
mov word [ebp - 0x159c], 0
mov byte [ebp - 0x159a], 0
lea eax, [ebp - 0x15dc]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x1594]
xorps xmm0, xmm0
push eax
lea ecx, [ebp - 0x15c4]
movlpd qword [ebp - 0x15dc], xmm0
call fcn.00411cc0
mov edi, dword [ebp - 0x15dc]
test al, al
jne 0x40ef2c
cmp dword [ebp - 0x15d8], 0
ja 0x40ef2c
jb 0x40eed4
test edi, edi
jne 0x40ef2c
lea ecx, [ebp - 0x15c4]
call fcn.0040dbb0
lea ecx, [ebp - 0x1594]
call fcn.004054a0
mov edi, 0x10000
mov edx, dword [ebp - 0x1550]
cmp edx, 0x10
jb 0x40f469
mov ecx, dword [ebp - 0x1564]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f45f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f4a4
jmp 0x40f45f
push edi
call fcn.004390a3
push edi
mov esi, eax
push 0
push esi
mov dword [ebp - 0x15d4], esi
call fcn.00444b80
sub esp, 0x18
lea eax, [ebp - 0x1594]
mov ecx, esp
push 8
push edi
push esi
mov dword [ecx + 0x24], 0
lea ecx, [ebp - 0x15c4]
push eax
call fcn.00411fc0
test al, al
je 0x40f41e
push str.down_dll_success
call fcn.00410320
push eax
call fcn.00410410
add esp, 8
cmp byte [esi], 0
je 0x40f102
mov dword [ebp - 0x1534], 0
mov dword [ebp - 0x1520], 0xf
mov dword [ebp - 0x1524], 0
mov byte [ebp - 0x1534], 0
mov byte [ebp - 4], 8
xor esi, esi
push 0xa00000
mov dword [ebp - 0x15d0], 0
call fcn.004390a3
push 0xa00000
push esi
push eax
mov dword [ebp - 0x15d8], eax
call fcn.00444b80
lea eax, [ebp - 0x151c]
mov dword [ebp - 0x151c], edi
mov edi, dword [ebp - 0x15d8]
lea edx, [ebp - 0x15c8]
push eax
push dword [ebp - 0x15d4]
mov ecx, edi
mov dword [ebp - 0x15c8], 0xa00000
call fcn.0041d0b0
add esp, 0x18
test eax, eax
jne 0x40f052
mov esi, dword [ebp - 0x15c8]
cmp esi, 0xa00000
je 0x40f04c
push esi
call fcn.004390a3
push esi
push 0
push eax
mov dword [ebp - 0x15d0], eax
call fcn.00444b80
push esi
push edi
push dword [ebp - 0x15d0]
call fcn.00444600
push edi
call fcn.004390ac
add esp, 0x20
jmp 0x40f052
mov dword [ebp - 0x15d0], edi
lea ecx, [ebp - 0x157c]
call fcn.004149f0
push ecx
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x15c8]
cmp dword [ebp - 0x1568], 0x10
lea eax, [ebp - 0x157c]
push ecx
cmovae eax, dword [ebp - 0x157c]
lea ecx, [ebp - 0x15d4]
push ecx
push ecx
mov ecx, dword [ebp - 0x15d0]
mov edx, esi
push eax
mov dword [ebp - 0x15d4], 0
mov dword [ebp - 0x15c8], 0
call fcn.0041d020
mov esi, dword [ebp - 0x15d4]
lea ecx, [ebp - 0x1534]
add esp, 0x14
push dword [ebp - 0x15c8]
push esi
call fcn.00405800
push esi
call fcn.00447d78
movups xmm0, xmmword [ebp - 0x1534]
add esp, 4
lea ecx, [ebp - 0x157c]
movups xmmword [ebp - 0x154c], xmm0
movq xmm0, qword [ebp - 0x1524]
movq qword [ebp - 0x153c], xmm0
call fcn.00405010
mov ecx, dword [ebp - 0x1538]
mov eax, dword [ebp - 0x153c]
jmp 0x40f125
xor eax, eax
mov dword [ebp - 0x154c], 0
mov ecx, 0xf
mov dword [ebp - 0x153c], eax
mov dword [ebp - 0x1538], ecx
mov byte [ebp - 0x154c], al
cmp ecx, 0x10
mov byte [ebp - 4], 0xa
push eax
lea esi, [ebp - 0x154c]
cmovae esi, dword [ebp - 0x154c]
push str.memory_load_dll__size_ld
call fcn.00410320
push eax
call fcn.00410410
mov edx, dword [ebp - 0x153c]
sub esp, 0xc
mov ecx, esi
mov edi, 0x20000
call fcn.00415070
mov esi, eax
add esp, 0x18
mov dword [ebp - 0x151c], esi
test esi, esi
je 0x40f273
push str.memory_load_dll_success
call fcn.00410320
push eax
call fcn.00410410
add esp, 8
mov ecx, esi
call fcn.00415600
mov dword [ebp - 0x15d8], eax
test eax, eax
je 0x40f26c
push str.memory_load_GetProcAddress_success
call fcn.00410320
push eax
call fcn.00410410
push 0x1000
lea eax, [ebp - 0x1518]
push 0
push eax
call fcn.00444b80
add esp, 0x14
lea eax, [ebp - 0x1518]
push eax
call fcn.0040cb30
movzx eax, byte [eax + 0x48]
push eax
call dword [ebp - 0x15d8]
lea ecx, [ebp - 0x1518]
add esp, 8
mov edi, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f1e5
mov esi, dword [ebp - 0x15e0]
lea eax, [ebp - 0x1518]
sub ecx, edx
push ecx
push eax
lea ecx, [esi + 0x10]
call fcn.00405800
cmp dword [esi + 0x24], 0x10
lea edx, [esi + 0x10]
jb 0x40f210
mov edx, dword [esi + 0x10]
push ecx
push dword [esi + 0x20]
lea ecx, [ebp - 0x157c]
call fcn.00414510
add esp, 8
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x157c]
cmp dword [ebp - 0x1568], 8
cmovae eax, dword [ebp - 0x157c]
push eax
mov eax, dword [ebp - 0x15e0]
push dword [eax + 0xc]
push str.dll_work_success__errcode0x_08X__json_ls
call fcn.00410320
push eax
call fcn.00410410
add esp, 0x10
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x157c]
call fcn.004054a0
mov esi, dword [ebp - 0x151c]
mov ecx, esi
call fcn.00415760
test edi, edi
je 0x40f283
cmp edi, 0x1000
jne 0x40f3de
cmp dword [ebp - 0x1550], 0x10
lea ecx, [ebp - 0x118]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea eax, [ebp - 0x1564]
cmovae eax, dword [ebp - 0x1564]
push ecx
push eax
push 0x483e18
push str.main
call esi
push 0
call fcn.00450cd2
push edx
push eax
lea ecx, [ebp - 0x1534]
call fcn.0040e7f0
add esp, 0xc
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x118]
cmp dword [ebp - 0x1520], 0x10
lea eax, [ebp - 0x1534]
push ecx
cmovae eax, dword [ebp - 0x1534]
push eax
push str.last
push str.main
call esi
cmp dword [ebp - 0x1520], 0x10
lea edx, [ebp - 0x1534]
push ecx
push dword [ebp - 0x1524]
cmovae edx, dword [ebp - 0x1534]
lea ecx, [ebp - 0x15f8]
call fcn.00414510
mov byte [ebp - 4], 0xd
lea edx, [ebp - 0x1564]
cmp dword [ebp - 0x1550], 0x10
lea ecx, [ebp - 0x157c]
cmovae edx, dword [ebp - 0x1564]
add esp, 4
push dword [ebp - 0x1554]
call fcn.00414510
add esp, 8
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x15f8]
cmp dword [ebp - 0x15e4], 8
lea eax, [ebp - 0x157c]
cmovae ecx, dword [ebp - 0x15f8]
cmp dword [ebp - 0x1568], 8
push ecx
cmovae eax, dword [ebp - 0x157c]
push eax
push str.write_config_file_success__servermd5_ls__lasttime_ls
call fcn.00410320
push eax
call fcn.00410410
add esp, 0x10
lea ecx, [ebp - 0x157c]
call fcn.004054a0
lea ecx, [ebp - 0x15f8]
call fcn.004054a0
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x1520]
cmp edx, 0x10
jb 0x40f3de
mov ecx, dword [ebp - 0x1534]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f3d4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f4a9
push edx
push ecx
call fcn.00439095
add esp, 8
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x1538]
cmp edx, 0x10
jb 0x40f423
mov ecx, dword [ebp - 0x154c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f412
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f4ae
push edx
push ecx
call fcn.00439095
add esp, 8
jmp 0x40f423
mov edi, 0x10000
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x15a0]
test ecx, ecx
je 0x40f44f
mov edx, dword [ecx]
lea eax, [ebp - 0x15c4]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [ebp - 0x15a0], 0
lea ecx, [ebp - 0x1594]
call fcn.004054a0
jmp 0x40eeef
push edx
push ecx
call fcn.00439095
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004390b1
mov esp, ebp
pop ebp
ret
call fcn.004480ba
push str.invalid_stoll_argument
call fcn.0043a7a3
push str.stoll_argument_out_of_range
call fcn.0043a7e3
call fcn.004480ba
call fcn.004480ba
call fcn.004480ba
call fcn.004480ba
int3