Function at 0x407440
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x487dfa
mov eax, dword fs:[0]
push eax
sub esp, 0x348
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a5584]
xor eax, esp
push eax
lea eax, [esp + 0x35c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x36c]
push 4
xor edi, edi
call fcn.00453535
add esp, 4
cmp eax, edi
je 0x40748c
lea ecx, [esp + 0x2c]
mov dword [eax], ecx
jmp 0x40748e
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
lea edx, [esp + 0x14]
push edx
mov ecx, 0x4981a0
mov dword [esp + 0x368], 1
call fcn.004030f0
mov byte [esp + 0x364], 2
mov edx, dword [esp + 0x38]
cmp edx, edi
jne 0x4074cc
xor ecx, ecx
jmp 0x4074d5
mov ecx, dword [esp + 0x40]
sub ecx, edx
sar ecx, 2
mov eax, dword [esp + 0x3c]
mov esi, eax
sub esi, edx
sar esi, 2
cmp esi, ecx
mov esi, eax
jae 0x407511
mov edx, dword [esp + 0x28]
mov byte [esp + 0x1c], 0
mov ecx, dword [esp + 0x1c]
push ecx
push edx
lea ecx, [esp + 0x1c]
push ecx
push eax
mov ecx, 1
call fcn.00405700
add esp, 0x10
add esi, 4
mov dword [esp + 0x3c], esi
jmp 0x407533
cmp edx, eax
jbe 0x40751a
call fcn.00452c03
mov eax, dword [esp + 0x2c]
push esi
push eax
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x3c]
call fcn.00404200
mov byte [esp + 0x364], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40755b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
push ecx
mov ecx, 0x4981b8
call fcn.004030f0
mov byte [esp + 0x364], 3
mov edx, dword [esp + 0x38]
cmp edx, edi
jne 0x40757e
xor ecx, ecx
jmp 0x407587
mov ecx, dword [esp + 0x40]
sub ecx, edx
sar ecx, 2
mov eax, dword [esp + 0x3c]
mov esi, eax
sub esi, edx
sar esi, 2
cmp esi, ecx
mov esi, eax
jae 0x4075c3
mov ecx, dword [esp + 0x28]
mov byte [esp + 0x1c], 0
mov edx, dword [esp + 0x1c]
push edx
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
mov ecx, 1
call fcn.00405700
add esp, 0x10
add esi, 4
mov dword [esp + 0x3c], esi
jmp 0x4075e5
cmp edx, eax
jbe 0x4075cc
call fcn.00452c03
mov eax, dword [esp + 0x2c]
push esi
push eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x50]
push ecx
lea eax, [esp + 0x3c]
call fcn.00404200
mov byte [esp + 0x364], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40760d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.0040d380
add esp, 4
lea esi, [esp + 0x18]
call fcn.004073b0
mov byte [esp + 0x364], 4
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x407684
mov eax, dword [esp + 0x18]
push eax
push str.IosPath:_s_not_exist
call fcn.00422460
mov byte [esp + 0x36c], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407674
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x2c]
call fcn.00403c50
mov eax, edi
jmp 0x407d3f
mov edx, dword [0x4a8404]
mov eax, dword [edx + 0xc]
mov ecx, 0x4a8404
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x364], 5
mov ecx, dword [esp + 0x18]
push ecx
push 0x4981f8
lea edi, [esp + 0x1c]
call fcn.00405530
mov ebx, dword [esp + 0x1c]
add esp, 8
push 3
lea edx, [esp + 0x54]
push ebx
lea eax, [esp + 0x54]
mov dword [esp + 0x54], edx
call fcn.00404590
mov byte [esp + 0x364], 6
mov edx, dword [esp + 0x4c]
test edx, edx
jne 0x4076e5
xor eax, eax
jmp 0x4076f9
mov eax, edx
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4076f0
sub eax, esi
mov edi, eax
push edx
lea eax, [ebp + 0x20]
call fcn.004053c0
mov byte [esp + 0x364], 5
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0x50]
cmp eax, ecx
je 0x407721
push eax
call fcn.00451fa8
add esp, 4
mov edx, dword [esp + 0x18]
push edx
push str.IosPath:_s
call fcn.00422460
mov edi, dword [esp + 0x20]
add esp, 8
cmp dword [0x4a73f4], 0
je 0x40779a
cmp dword [0x4aedc0], 0
mov dword [0x4a73f4], 0
jne 0x407790
push 0x4aeda8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x4aedc0], 0
jne 0x407785
push 0x4ae998
mov ecx, str.360base.dll
call fcn.0040c6c0
mov dword [0x4aedc4], eax
mov dword [0x4aedc0], 1
push 0x4aeda8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x4aedc4]
mov dword [0x4afaf4], eax
cmp dword [0x4afaf4], 0
je 0x4077b1
push 0x4ae998
call fcn.0040c930
test eax, eax
jne 0x40780d
lea eax, [ebx - 0x10]
mov byte [esp + 0x364], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4077d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x364], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4077fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x2c]
call fcn.00403c50
xor eax, eax
jmp 0x407d3f
lea esi, [esp + 0x24]
call fcn.00407330
mov byte [esp + 0x364], 7
mov ecx, dword [esp + 0x24]
mov esi, ebp
call fcn.00423fc0
test eax, eax
jne 0x4078c7
mov ecx, dword [esp + 0x24]
push ecx
push str.CmdPath:_s_Create_fail
call fcn.00422460
mov byte [esp + 0x36c], 5
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
add esp, 8
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40786b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x364], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40788f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x364], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4078b7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x2c]
call fcn.00403c50
xor eax, eax
jmp 0x407d3f
mov edi, ebp
call fcn.004244d0
mov ecx, dword [esp + 0x24]
push ecx
push str.CMDPath:_s
call fcn.00422460
mov edx, dword [0x4a8404]
mov eax, dword [edx + 0xc]
add esp, 8
mov ecx, 0x4a8404
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
lea eax, [ebp + 0x20]
push eax
push ebp
mov byte [esp + 0x36c], 8
call fcn.00424410
mov ebx, dword [ebp + 0x24]
push 0xea60
lea ecx, [esp + 0x20]
call fcn.00424220
mov esi, dword [esp + 0x1c]
push 3
lea ecx, [esp + 0x54]
push esi
lea eax, [esp + 0x54]
mov dword [esp + 0x54], ecx
call fcn.004044f0
lea edx, [esp + 0x28]
mov byte [esp + 0x364], 9
mov ecx, dword [esp + 0x4c]
push edx
call fcn.004030f0
mov byte [esp + 0x364], 0xb
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0x50]
cmp eax, ecx
je 0x407965
push eax
call fcn.00451fa8
add esp, 4
mov edx, dword [esp + 0x28]
push edx
push str.daemon:_s
call fcn.00422460
mov eax, dword [esi - 0xc]
add esp, 8
test eax, eax
jl 0x407998
push str.daemon_started_successfully
push esi
call fcn.00453712
add esp, 8
test eax, eax
je 0x407998
sub eax, esi
jns 0x407c09
call fcn.0040d260
test eax, eax
je 0x407c09
lea esi, [ebp + 0x20]
push esi
call fcn.00408930
mov esi, dword [esi]
lea eax, [esp + 0x154]
push 3
mov dword [esp + 0x154], eax
push esi
lea eax, [esp + 0x158]
call fcn.004044f0
lea ecx, [esp + 0x20]
mov byte [esp + 0x364], 0xc
push ecx
mov ecx, dword [esp + 0x154]
call fcn.004030f0
mov byte [esp + 0x364], 0xe
mov eax, dword [esp + 0x150]
lea edx, [esp + 0x154]
cmp eax, edx
je 0x407a09
push eax
call fcn.00451fa8
add esp, 4
mov eax, dword [esp + 0x20]
push eax
push str.x64_try_IosPath:_s
call fcn.00422460
add esp, 8
lea eax, [ebp + 0x20]
push eax
push ebp
call fcn.00424410
mov ebx, dword [ebp + 0x24]
push 0xea60
lea ecx, [esp + 0x20]
mov edi, ebp
call fcn.00424220
mov esi, dword [esp + 0x1c]
push 3
lea ecx, [esp + 0x25c]
push esi
lea eax, [esp + 0x25c]
mov dword [esp + 0x25c], ecx
call fcn.004044f0
mov byte [esp + 0x364], 0xf
mov edx, dword [esp + 0x254]
test edx, edx
jne 0x407a70
xor eax, eax
jmp 0x407a84
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407a75
sub eax, edi
sar eax, 1
mov ebx, eax
push edx
lea eax, [esp + 0x24]
call fcn.00404790
mov byte [esp + 0x364], 0xe
mov eax, dword [esp + 0x254]
lea edx, [esp + 0x258]
cmp eax, edx
je 0x407ab3
push eax
call fcn.00451fa8
add esp, 4
mov eax, dword [esp + 0x20]
push eax
push str.daemon:_s
call fcn.00422460
add esp, 8
cmp dword [esi - 0xc], 0
jl 0x407ae5
push str.daemon_started_successfully
push esi
call fcn.00453712
add esp, 8
test eax, eax
je 0x407ae5
sub eax, esi
jns 0x407be1
mov byte [esp + 0x364], 0xb
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407b0d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x364], 8
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407b35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov byte [esp + 0x364], 7
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407b59
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [esp + 0x364], 5
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407b81
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x364], 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407ba9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x364], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407bd1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x2c]
call fcn.00403c50
xor eax, eax
jmp 0x407d3f
mov byte [esp + 0x364], 0xb
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407c09
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x364], 8
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov ebx, 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407c36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov byte [esp + 0x364], 7
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407c5a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [esp + 0x364], 5
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407c82
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x364], 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407caa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x364], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407cd1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x364], 0xffffffff
mov esi, dword [esp + 0x38]
test esi, esi
je 0x407d22
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x407d19
mov edi, edi
mov eax, dword [esi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407d0e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x407cf0
mov esi, dword [esp + 0x38]
push esi
call fcn.00451a72
add esp, 4
mov ecx, dword [esp + 0x2c]
xor eax, eax
push ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
call fcn.00451a72
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x35c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x354
ret 4