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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4217c0
push 0x40934c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, 0x138c
call fcn.004090c0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov esi, dword [ebp + 8]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 4
jbe 0x4076d3
push 4
push 0x42b3c8
push esi
call fcn.00409254
add esp, 0xc
test eax, eax
jne 0x4076d3
lea edi, [esi + 4]
lea edx, [ebp - 0xa20]
jmp 0x4076db
lea edx, [ebp - 0xa20]
mov edi, esi
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, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0xa24]
push ecx
lea edx, [ebp - 0x818]
push edx
push 0x800
lea eax, [ebp - 0xa20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp eax, 0x800
jb 0x407732
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x42b3c4
lea ecx, [ebp - 0x818]
push ecx
call fcn.0040954e
add esp, 8
test eax, eax
jne 0x407bf7
push 0x7e
lea edx, [ebp - 0x818]
push edx
call fcn.004095c4
add esp, 8
test eax, eax
je 0x407bf7
push 0x42b3b0
push 0x42a948
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ebx, ebx
cmp eax, ebx
je 0x4077a1
mov esi, dword [ebp + 0x10]
push esi
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x818]
push edx
call eax
cmp eax, ebx
jbe 0x4077a1
cmp eax, esi
jbe 0x407c1b
mov dword [ebp - 4], ebx
mov al, byte [ebp - 0xa20]
test al, al
je 0x407bba
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x407bba
lea edi, [ebp - 0x818]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp - 0x1398], ecx
lea edi, [ebp - 0x818]
lea edx, [ebp - 0xd78]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0xd78]
push ecx
call fcn.00407630
add esp, 4
mov dword [ebp - 0x139c], ebx
mov dword [ebp - 0x118c], ebx
lea edi, [ebp - 0xd78]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jb 0x40789f
movsx edx, byte [ebp - 0xd78]
push edx
call fcn.004096f5
add esp, 4
test eax, eax
je 0x40789f
cmp byte [ebp - 0xd77], 0x3a
jne 0x40789f
lea edi, [ebp - 0xd78]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jne 0x40786f
or ebx, 0xffffffff
jmp 0x407910
cmp byte [ebp - 0xd76], 0x5c
jne 0x407896
lea edi, [ebp - 0xd78]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 3
jne 0x407916
or ebx, 0xffffffff
jmp 0x407910
push 0
push 0
call fcn.0040974b
lea edi, [ebp - 0xd78]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jb 0x407916
cmp byte [ebp - 0xd78], 0x5c
jne 0x407916
lea edi, [ebp - 0xd78]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jne 0x4078d7
or ebx, 0xffffffff
jmp 0x407910
cmp byte [ebp - 0xd77], 0x5c
jne 0x40790f
push 0x5c
lea eax, [ebp - 0xd78]
push eax
call fcn.004095c4
add esp, 8
mov ebx, eax
lea ecx, [ebp - 0xd78]
sub ebx, ecx
mov dword [ebp - 0x118c], ebx
cmp ebx, 2
jge 0x40790f
push 0
push 0
call fcn.0040974b
inc ebx
mov dword [ebp - 0x118c], ebx
push 3
lea edx, [ebp - 0xd78]
push edx
lea eax, [ebp - 0x1188]
push eax
call fcn.0040965b
add esp, 0xc
mov byte [ebp - 0x1185], 0
lea edi, [ebp - 0xd75]
lea edx, [ebp - 0xd78]
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, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x1188]
lea edx, [ebp - 0xf80]
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, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x1188]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test ebx, ebx
jl 0x407ba2
push 0x5c
lea eax, [ebp - 0xd78]
push eax
call fcn.004095c4
add esp, 8
mov ebx, eax
lea ecx, [ebp - 0xd78]
sub ebx, ecx
mov dword [ebp - 0x118c], ebx
jne 0x407aa4
lea edi, [ebp - 0xd77]
lea edx, [ebp - 0xd78]
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, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edx, [ebp - 0xf80]
mov edi, 0x42b3ac
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x5c
lea eax, [ebp - 0xd78]
push eax
call fcn.004095c4
add esp, 8
mov ebx, eax
lea ecx, [ebp - 0xd78]
sub ebx, ecx
mov dword [ebp - 0x118c], ebx
mov esi, ebx
mov dword [ebp - 0x13a0], esi
test ebx, ebx
jge 0x407a78
lea edi, [ebp - 0xd78]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov dword [ebp - 0x13a0], esi
push esi
lea edx, [ebp - 0xd78]
push edx
lea eax, [ebp - 0x1394]
push eax
call fcn.0040965b
add esp, 0xc
mov byte [ebp + esi - 0x1394], 0
test ebx, ebx
jge 0x407ac6
mov byte [ebp - 0xd78], 0
jmp 0x407af0
test ebx, ebx
jge 0x407a54
lea edi, [ebp - 0xd78]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x407a54
mov dword [ebp - 4], 0xffffffff
jmp 0x407c1b
lea edi, [ebp + ebx - 0xd78]
lea edx, [ebp - 0xd78]
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, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x1394]
lea edx, [ebp - 0xf80]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0xb70]
push eax
lea ecx, [ebp - 0xf80]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x13a4], eax
cmp eax, 0xffffffff
jne 0x407b49
push 0
push 0
call fcn.0040974b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea edi, [ebp - 0xb44]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, dword [ebp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test ebx, ebx
jl 0x407ba2
mov edi, 0x42b3ac
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, dword [ebp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
jmp 0x40799f
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x407bee
push 0
push 0
call fcn.0040974b
push ebx
push ebx
call fcn.0040974b
mov eax, 1
ret
mov dword [ebp - 4], 0xffffffff
jmp 0x407c1b
lea edi, [ebp - 0x818]
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, dword [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret