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

Disassembly:
push ebx
mov ebx, eax
mov eax, edx
push esi
add esp, 0xfffffef8
and eax, 7
cmp eax, 2
jne 0x407692
mov eax, ebx
jmp 0x407562
inc dword [0x41b874]
mov ecx, dword [0x41b874]
mov dl, byte [eax]
inc eax
test dl, dl
mov byte [ecx], dl
jne 0x40755c
mov eax, dword [0x41b86c]
call fcn.00407211
test eax, eax
je 0x407598
mov eax, ebx
jmp 0x407589
inc dword [0x41b878]
mov ecx, dword [0x41b878]
mov dl, byte [eax]
inc eax
test dl, dl
mov byte [ecx], dl
jne 0x407583
push dword [0x41b870]
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x407621
cmp dword [0x40efb4], 0
jne 0x4075d1
mov eax, dword [0x41b86c]
call fcn.00406d64
mov eax, dword [0x41b870]
call fcn.00406d64
mov eax, 2
jmp 0x40795e
mov eax, dword [0x41b870]
call fcn.00406e1c
inc eax
jne 0x407615
push dword [0x41b870]
mov eax, 0x6f
call fcn.00402b08
push eax
call fcn.004030c0
add esp, 8
mov eax, dword [0x41b86c]
call fcn.00406d64
mov eax, dword [0x41b870]
call fcn.00406d64
mov eax, 3
jmp 0x40795e
mov dword [0x41b858], 1
jmp 0x40765d
test bl, 0x10
jne 0x40765d
push dword [0x41b870]
mov eax, 0x6f
call fcn.00402b08
push eax
call fcn.004030c0
add esp, 8
mov eax, dword [0x41b86c]
call fcn.00406d64
mov eax, dword [0x41b870]
call fcn.00406d64
mov eax, 3
jmp 0x40795e
mov edx, dword [0x41b874]
inc dword [0x41b874]
mov byte [edx], 0x2f
mov ecx, dword [0x41b878]
inc dword [0x41b878]
mov byte [ecx], 0x2f
mov eax, dword [0x41b878]
xor edx, edx
mov byte [eax], dl
mov eax, dword [0x41b874]
mov byte [eax], dl
xor eax, eax
jmp 0x40795e
mov eax, edx
and eax, 7
cmp eax, 4
jne 0x4076de
mov edx, dword [0x41b870]
mov eax, ebx
call fcn.00407028
mov eax, dword [0x41b870]
call fcn.00406d64
mov eax, dword [0x41b86c]
call fcn.00406d64
xor edx, edx
mov dword [0x41b878], edx
mov dword [0x41b874], edx
mov dword [0x41b870], edx
mov dword [0x41b86c], edx
xor eax, eax
jmp 0x40795e
cmp eax, 3
jne 0x40775f
mov eax, ebx
xor esi, esi
jmp 0x407717
inc dword [0x41b874]
mov edx, dword [0x41b874]
sub edx, dword [0x41b86c]
cmp edx, 0x104
jl 0x407717
dec dword [0x41b874]
mov esi, 1
mov ecx, dword [0x41b874]
mov byte [ecx], 0
mov ecx, dword [0x41b874]
mov dl, byte [eax]
inc eax
test dl, dl
mov byte [ecx], dl
jne 0x4076e9
mov eax, dword [0x40f5ec]
test byte [eax + 0x14], 0x20
jne 0x40773f
mov eax, dword [0x41b86c]
call fcn.00407211
test eax, eax
je 0x407758
mov eax, ebx
jmp 0x407749
inc dword [0x41b878]
mov ecx, dword [0x41b878]
mov dl, byte [eax]
inc eax
test dl, dl
mov byte [ecx], dl
jne 0x407743
mov eax, esi
jmp 0x40795e
mov ecx, edx
and ecx, 7
dec ecx
jne 0x407932
mov eax, dword [0x41b860]
add eax, dword [0x41b988]
inc eax
call fcn.00406d50
mov dword [0x41b86c], eax
test eax, eax
jne 0x40778f
mov eax, 0xa
jmp 0x40795e
mov eax, dword [0x41b860]
add eax, dword [0x41b988]
inc eax
call fcn.00406d50
mov dword [0x41b870], eax
test eax, eax
jne 0x4077bd
mov eax, dword [0x41b86c]
call fcn.00406d64
mov eax, 0xa
jmp 0x40795e
mov edx, dword [0x40f5ec]
test byte [edx + 0x14], 0x20
je 0x4078bb
cmp dword [0x41b85c], 0
je 0x4077f6
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x3a
jne 0x4077f6
xor eax, eax
mov al, byte [ebx]
call fcn.00406de0
mov edx, dword [0x41b86c]
mov byte [edx], al
jmp 0x407876
cmp dword [0x41b85c], 0
jne 0x407831
cmp dword [0x41b988], 1
jle 0x407831
mov ecx, dword [0x41b868]
xor eax, eax
mov al, byte [ecx + 1]
cmp eax, 0x3a
jne 0x407831
mov edx, dword [0x41b868]
xor eax, eax
mov al, byte [edx]
call fcn.00406de0
mov edx, dword [0x41b86c]
mov byte [edx], al
jmp 0x407876
push esp
lea ecx, [esp + 8]
push ecx
push 0x104
push 0x40c64b
call sub.KERNEL32.DLL_GetFullPathNameA
cmp eax, 0x104
jbe 0x407857
mov eax, 1
jmp 0x40795e
xor edx, edx
mov dl, byte [esp + 4]
add edx, 0xffffffa0
mov dword [0x41b864], edx
mov eax, dword [0x41b86c]
mov cl, byte [0x41b864]
add cl, 0x60
mov byte [eax], cl
mov edx, dword [0x41b86c]
xor ecx, ecx
mov cl, byte [edx]
add ecx, 0xffffffa0
mov dword [0x41b864], ecx
mov eax, dword [0x41b86c]
xor edx, edx
mov dl, byte [eax]
cmp edx, 0x61
jge 0x4078b0
call fcn.00406d64
mov eax, dword [0x41b870]
call fcn.00406d64
mov eax, 0x4e
jmp 0x40795e
mov edx, dword [0x41b86c]
mov byte [edx], 0
jmp 0x4078f6
cmp dword [0x41b85c], 0
je 0x4078d2
mov edx, ebx
mov eax, dword [0x41b86c]
call fcn.00407028
jmp 0x4078f6
cmp dword [0x41b988], 0
jle 0x4078ed
mov edx, dword [0x41b868]
mov eax, dword [0x41b86c]
call fcn.00407028
jmp 0x4078f6
mov ecx, dword [0x41b86c]
mov byte [ecx], 0
mov eax, dword [0x41b86c]
mov dword [0x41b874], eax
mov edx, dword [0x41b870]
mov dword [0x41b878], edx
jmp 0x40791a
inc dword [0x41b878]
inc dword [0x41b874]
mov ecx, dword [0x41b874]
mov edx, dword [0x41b878]
mov al, byte [ecx]
mov byte [edx], al
test al, al
jne 0x40790e
xor eax, eax
jmp 0x40795e
and edx, 7
cmp edx, 5
jne 0x407959
cmp dword [0x41b988], 0
jle 0x407955
mov eax, dword [0x41b868]
call fcn.00406d64
xor edx, edx
mov dword [0x41b988], edx
xor eax, eax
jmp 0x40795e
mov eax, 0x63
add esp, 0x108
pop esi
pop ebx
ret