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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x43a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x20c]
push ebx
mov ebx, dword [ebp + 8]
sub edx, ecx
push esi
push edi
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x218], eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40c7a0
lea eax, [ebp - 0x20c]
push 0x2f
push eax
call fcn.0041de51
add esp, 8
mov ecx, 0x5c
test eax, eax
je 0x40c7ea
nop word [eax + eax]
mov word [eax], cx
add eax, 2
push 0x2f
push eax
call fcn.0041de51
add esp, 8
mov ecx, 0x5c
test eax, eax
jne 0x40c7d0
lea esi, [ebp - 0x20c]
push 0x5c
push esi
mov edi, esi
call fcn.0041de51
mov esi, eax
add esp, 8
test esi, esi
je 0x40c950
sub eax, edi
sar eax, 1
je 0x40c945
cmp eax, 1
jne 0x40c81c
cmp word [edi], 0x2e
jmp 0x40c82c
cmp eax, 2
jne 0x40c832
cmp word [edi], 0x2e
jne 0x40c832
cmp word [edi + 2], 0x2e
je 0x40c945
mov eax, edi
cmp edi, esi
jae 0x40c851
nop dword [eax + eax]
cmp word [eax], 0x2e
jne 0x40c945
add eax, 2
cmp eax, esi
jb 0x40c840
movzx eax, word [esi]
mov edx, esi
mov ecx, eax
cmp eax, 0x5c
jne 0x40c86e
nop dword [eax]
movzx eax, word [edx + 2]
add edx, 2
cmp eax, 0x5c
je 0x40c860
mov ecx, eax
cmp cx, 0x2e
jne 0x40c913
movzx eax, word [edx + 2]
lea ebx, [edx + 2]
cmp eax, 0x5c
je 0x40c8e5
test ax, ax
je 0x40c8e5
cmp eax, 0x2e
jne 0x40c913
movzx eax, word [edx + 4]
lea ecx, [edx + 4]
cmp eax, 0x5c
je 0x40c8a3
test ax, ax
jne 0x40c913
lfence
cmp word [ecx], 0x5c
jne 0x40c8b9
nop dword [eax]
add ecx, 2
cmp word [ecx], 0x5c
je 0x40c8b0
mov edx, ecx
lea esi, [edx + 2]
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40c8c0
sub edx, esi
sar edx, 1
lea eax, [edx*2 + 2]
push eax
push ecx
push edi
call fcn.0041ec00
add esp, 0xc
mov esi, edi
jmp 0x40c948
mov ecx, ebx
lfence
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c8f0
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push ebx
push esi
call fcn.0041ec00
add esp, 0xc
jmp 0x40c948
add esi, 2
cmp edx, esi
jbe 0x40c948
mov ecx, edx
lfence
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c922
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push esi
call fcn.0041ec00
add esp, 0xc
jmp 0x40c948
add esi, 2
test esi, esi
jne 0x40c7f0
mov eax, dword [ebp - 0x20c]
mov ecx, 0x2a
mov ebx, dword [ebp - 0x214]
test ax, ax
cmove eax, ecx
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x210]
push eax
push ebx
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x40c9ba
lea ecx, [ebp - 0x20c]
mov edx, ebx
mov eax, ecx
sub edx, eax
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40c9a0
mov dword [ebp - 0x210], 0
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.0041df18
mov esi, eax
add esp, 8
test esi, esi
je 0x40c9d6
add esi, 2
jmp 0x40c9dc
lea esi, [ebp - 0x20c]
movzx eax, word [esi]
push 0x103
push eax
call fcn.0041f340
add esp, 8
test eax, eax
je 0x40ca03
cmp word [esi + 2], 0x3a
jne 0x40ca03
cmp word [esi + 4], 0x5c
jne 0x40cae2
mov ecx, dword [ebp - 0x210]
test ecx, ecx
jne 0x40ca75
movzx eax, word [esi]
test ax, ax
je 0x40cafc
cmp eax, 0x2e
jne 0x40ca3a
movzx eax, word [esi + 2]
test ax, ax
je 0x40cafc
cmp eax, 0x2e
jne 0x40ca3a
cmp word [esi + 4], cx
je 0x40cafc
mov ecx, ebx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ca40
sub ecx, edx
sar ecx, 1
lea ecx, [ebx + ecx*2]
mov dword [ebp - 0x210], ecx
sub ecx, esi
nop word [eax + eax]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x40ca60
jmp 0x40cafc
mov edx, ecx
mov eax, esi
nop dword [eax]
mov di, word [eax]
cmp di, word [edx]
jne 0x40caa6
test di, di
je 0x40caa2
mov di, word [eax + 2]
cmp di, word [edx + 2]
jne 0x40caa6
add eax, 4
add edx, 4
test di, di
jne 0x40ca80
xor eax, eax
jmp 0x40caab
sbb eax, eax
or eax, 1
test eax, eax
je 0x40cae8
movzx eax, word [esi]
test ax, ax
je 0x40cae8
cmp eax, 0x2e
jne 0x40cad1
movzx eax, word [esi + 2]
test ax, ax
je 0x40cae8
cmp eax, 0x2e
jne 0x40cad1
cmp word [esi + 4], 0
je 0x40cae8
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40cad1
mov ecx, dword [ebp - 0x210]
test ecx, ecx
je 0x40cafc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40cb3d
test al, 0x10
je 0x40cb3d
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cb01
sub ecx, edx
sar ecx, 1
lea eax, [ebx + ecx*2]
mov dword [ebp - 0x210], eax
cmp word [eax - 2], 0x5c
je 0x40cb37
mov ecx, 0x5c
mov word [eax], cx
mov eax, dword [ebp - 0x210]
add eax, 2
mov dword [ebp - 0x210], eax
mov dword [eax], 0x2a
mov ecx, dword [ebp - 0x218]
pop edi
pop esi
pop ebx
test ecx, ecx
je 0x40cb52
mov eax, dword [ebp - 0x210]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret