Function at 0x4077c0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x475288
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x4981c4]
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 edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov esi, dword [edi]
mov dword [ebp - 4], 0
cmp dword [esi - 0xc], 0
je 0x407a02
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
je 0x407a02
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00416ba0
add esp, 0xc
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
lea eax, [ebp - 0x218]
je 0x407871
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call esi
push dword [edi]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
jmp 0x4078ab
mov esi, dword [edi]
lea ecx, [ebp - 0x218]
mov edx, 0x104
sub esi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x40789e
movzx eax, word [esi + ecx]
test ax, ax
je 0x40789e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x407880
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407a02
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x2a4], eax
test eax, eax
je 0x407a02
mov edi, dword [ebx]
lea eax, [ebp - 0x298]
mov dword [ebp - 0x29c], eax
test edi, edi
jne 0x4078fa
xor eax, eax
mov dword [ebp - 0x29c], eax
jmp 0x4079ca
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407900
sub ecx, edx
lea eax, [ebp - 0x298]
sar ecx, 1
push 0x80
push eax
lea eax, [ebp - 0x29c]
lea ebx, [ecx + 1]
lea esi, [ebx*4]
mov dword [ebp - 0x2a0], ebx
push esi
push eax
call fcn.004076e0
add esp, 0x10
push 0
push 0
push esi
push dword [ebp - 0x29c]
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push edi
push 0
push 3
call esi
xor ebx, ebx
test eax, eax
sete bl
test eax, eax
jne 0x4079bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4079bc
mov ebx, dword [ebp - 0x2a0]
push 0
push 0
push 0
push 0
push ebx
push edi
push 0
push 3
call esi
mov esi, eax
lea eax, [ebp - 0x298]
push 0x80
push eax
lea eax, [ebp - 0x29c]
push esi
push eax
call fcn.004076e0
add esp, 0x10
push 0
push 0
push esi
push dword [ebp - 0x29c]
push ebx
push edi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
test ebx, ebx
jne 0x407a46
mov eax, dword [ebp - 0x29c]
push eax
push dword [ebp - 0x2a4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
lea ecx, [ebp - 0x298]
mov eax, dword [ebp - 0x29c]
cmp eax, ecx
je 0x4079f2
push eax
call fcn.0041f3f2
add esp, 4
test esi, esi
je 0x407a02
push dword [ebp + 0x10]
call esi
mov edi, 1
jmp 0x407a04
xor edi, edi
mov esi, dword [ebp + 0x10]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x407a26
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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.004148a9
mov esp, ebp
pop ebp
ret 0xc
push 0x80
lea eax, [ebp - 0x298]
push eax
push dword [ebp - 0x29c]
call fcn.00407760
add esp, 0xc
call fcn.004077a0
int3