Function at 0x407740
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x422426
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x42d00c]
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
mov ebx, ecx
mov dword [ebp - 0x22c], ebx
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x407788
xor al, al
jmp 0x407a09
push ebx
lea ecx, [ebp - 0x224]
call fcn.00404f30
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x224]
mov esi, dword [eax - 0xc]
test esi, esi
jns 0x4077b2
push 0x80070057
call fcn.00405f60
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x4077d5
push esi
lea ecx, [ebp - 0x224]
call fcn.00405fd0
mov eax, dword [ebp - 0x224]
lea ecx, [esi + 1]
push ecx
push eax
call fcn.00415cff
mov eax, dword [ebp - 0x224]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x4077a8
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp - 0x224]
xor edi, edi
or ebx, 0xffffffff
mov word [eax + esi*2], cx
push dword [edi + 0x429c58]
lea ecx, [ebp - 0x228]
call fcn.00404f30
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x228]
mov esi, dword [eax - 0xc]
test esi, esi
js 0x4077a8
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x407846
push esi
lea ecx, [ebp - 0x228]
call fcn.00405fd0
mov eax, dword [ebp - 0x228]
lea ecx, [esi + 1]
push ecx
push eax
call fcn.00415cff
mov eax, dword [ebp - 0x228]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x4077a8
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp - 0x228]
mov word [eax + esi*2], cx
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x4078ab
mov ecx, dword [ebp - 0x224]
cmp dword [ecx - 0xc], 0
jl 0x4078ab
push eax
push ecx
call fcn.0040f444
add esp, 8
test eax, eax
je 0x4078a5
sub eax, dword [ebp - 0x224]
sar eax, 1
test eax, eax
jg 0x4079b5
mov eax, dword [ebp - 0x228]
lea edx, [eax - 0x10]
mov byte [ebp - 4], 0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4078c6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 4
cmp edi, 0x7c
jb 0x407801
mov esi, dword [ebp - 0x22c]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x4079e0
push esi
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
je 0x4079e0
push 0x20a
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.0040f860
add esp, 4
lea edx, [ebp - 0x220]
mov ecx, esi
call fcn.004075a0
add esp, 8
test eax, eax
je 0x4079e0
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407930
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x224]
call fcn.00405760
lea ecx, [ebp - 0x224]
call fcn.00407ad0
mov eax, dword [ebp - 0x224]
cmp dword [eax - 0xc], 0
jl 0x4079dc
push 0x42968c
push eax
call fcn.0040f444
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x224]
test ecx, ecx
je 0x40798b
sub ecx, eax
sar ecx, 1
test ecx, ecx
jg 0x4079dc
cmp dword [eax - 0xc], 0
jl 0x4079dc
push str.TENCENT
push eax
call fcn.0040f444
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4079d6
mov eax, dword [ebp - 0x224]
sub ecx, eax
sar ecx, 1
je 0x4079e6
mov bl, 1
jmp 0x4079e8
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x228]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4079d6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x224]
mov bl, 1
jmp 0x4079e8
mov eax, dword [ebp - 0x224]
xor bl, bl
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x407a07
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
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.0040d320
mov esp, ebp
pop ebp
ret