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

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
xor ebx, ebx
push ebp
mov dword [esp + 0x24], ebx
mov byte [esp + 0x12], bl
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], 0xffffffff
call fcn.00408cd0
add esp, 4
test eax, eax
jne 0x40bbf8
mov esi, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40bbee
push ebx
push esi
call fcn.0040c120
add esp, 8
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x18
ret
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + ebp - 1]
mov ecx, eax
dec eax
cmp ecx, ebp
jbe 0x40bc1c
cmp byte [eax], 0x2f
je 0x40bc1c
mov edx, eax
dec eax
cmp edx, ebp
ja 0x40bc10
lea esi, [eax + 1]
test ebx, ebx
mov al, byte [esi]
mov byte [esi], 0
mov byte [esp + 0x13], al
je 0x40bc32
mov cl, byte [esp + 0x12]
mov byte [ebx], cl
mov edx, dword [esp + 0x2c]
mov ebx, esi
push edx
mov byte [esp + 0x16], al
call fcn.0040bee0
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40bc51
cmp esi, ebp
ja 0x40bbf9
mov dword [esp + 0x30], esi
inc esi
push 0x2f
push esi
call fcn.00409210
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x18], esi
je 0x40bc96
mov byte [esi], 0
inc esi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x18], esi
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x2c]
not ecx
dec ecx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ecx, [edx + ecx + 0x101]
jmp 0x40bca9
mov edi, dword [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xff
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x40bebc
push ecx
call fcn.0040db38
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40bec0
mov edi, dword [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ebx, ebx
mov dword [esp + 0x2c], ecx
je 0x40bd03
mov cl, byte [esp + 0x13]
mov byte [ebx], cl
mov edx, dword [esp + 0x30]
push edx
call fcn.00408cd0
add esp, 4
test eax, eax
jne 0x40bd69
mov dword [esp + 0x14], 0xffffffff
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
pop edi
test eax, eax
je 0x40bd32
push eax
call fcn.0040c040
add esp, 4
test esi, esi
je 0x40bd3a
mov byte [esi - 1], 0x2f
test ebp, ebp
je 0x40bd47
push ebp
call fcn.0040d38c
add esp, 4
cmp dword [esp + 0x10], 0xffffffff
jne 0x40bd5e
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40bd5e
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040c060
mov edi, eax
add esp, 4
test edi, edi
je 0x40bd1c
mov esi, 0x41c6ac
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40bdab
test cl, cl
je 0x40bda7
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40bdab
add eax, 2
add esi, 2
test cl, cl
jne 0x40bd83
xor eax, eax
jmp 0x40bdb0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40bea0
mov esi, 0x41d730
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40bde7
test cl, cl
je 0x40bde3
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40bde7
add eax, 2
add esi, 2
test cl, cl
jne 0x40bdbf
xor eax, eax
jmp 0x40bdec
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40bea0
mov eax, dword [esp + 0x30]
push 0
push edi
push eax
call fcn.00408ff0
add esp, 0xc
test eax, eax
je 0x40bea0
mov ecx, dword [esp + 0x2c]
xor eax, eax
lea ebx, [ecx + ebp]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
test esi, esi
je 0x40be77
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
mov edx, ecx
or ecx, 0xffffffff
add edx, ebp
mov byte [edx], 0x2f
inc edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, edx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0040bba0
add esp, 8
mov dword [esp + 0x14], eax
jmp 0x40be86
push 0
push ebp
call fcn.0040c120
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
mov byte [ebx], 0
jne 0x40be97
mov dword [esp + 0x20], 1
jmp 0x40bea0
cmp eax, 0xffffffff
jne 0x40bd1c
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0040c060
mov edi, eax
add esp, 4
test edi, edi
jne 0x40bd7c
jmp 0x40bd1c
mov ebp, dword [esp + 0x24]
test ebx, ebx
je 0x40beca
mov dl, byte [esp + 0x13]
mov byte [ebx], dl
mov eax, edi
neg eax
sbb eax, eax
and eax, 5
dec eax
mov dword [esp + 0x14], eax
jmp 0x40bd20