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

Disassembly:
push 0xffffffffffffffff
push 0x417ad0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x48]
push edi
push str..log
lea eax, [esp + 0x30]
push esi
push eax
call fcn.004034b0
add esp, 0xc
mov eax, dword [esp + 0x30]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x44], ebx
jne 0x402ac6
mov eax, 0x4192c4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402bda
xor ebp, ebp
push ebp
lea ecx, [esp + 0x14]
push str._08X
push ecx
call fcn.0040bed5
mov dl, byte [esi]
add esp, 0xc
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1c], dl
push ebx
call fcn.00402ff0
mov eax, dword [0x4192c8]
lea ecx, [esp + 0x1c]
push eax
push ebx
push esi
call fcn.00402df0
push 0x7e
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x4c], 1
call fcn.00402d20
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x24]
call fcn.00403040
mov edi, str..log
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str..log
lea ecx, [esp + 0x24]
call fcn.00403040
mov eax, dword [esp + 0x20]
cmp eax, ebx
jne 0x402b66
mov eax, 0x4192c4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402bb5
cmp ebp, 0xffffffff
mov byte [esp + 0x44], bl
je 0x402c32
mov ecx, dword [esp + 0x20]
cmp ecx, ebx
je 0x402ba3
mov al, byte [ecx - 1]
cmp al, bl
je 0x402b99
cmp al, 0xff
je 0x402b99
dec al
mov byte [ecx - 1], al
jmp 0x402ba3
dec ecx
push ecx
call fcn.0040afd2
add esp, 4
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
inc ebp
jmp 0x402ad8
mov edx, dword [0x4192c8]
lea eax, [esp + 0x1c]
push edx
push ebx
push eax
lea ecx, [esp + 0x38]
call fcn.00402df0
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x48], bl
call fcn.00402ff0
mov eax, dword [esp + 0x30]
cmp eax, ebx
jne 0x402be7
mov eax, 0x4192c4
push ebx
push 0x80
push 1
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402c84
mov ecx, dword [esp + 0x30]
cmp ecx, ebx
je 0x402c6f
mov al, byte [ecx - 1]
cmp al, bl
je 0x402c65
cmp al, 0xff
je 0x402c65
dec al
pop edi
pop esi
mov byte [ecx - 1], al
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
push 1
lea ecx, [esp + 0x20]
call fcn.00402ff0
push 1
lea ecx, [esp + 0x30]
mov dword [esp + 0x48], 0xffffffff
call fcn.00402ff0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
dec ecx
push ecx
call fcn.0040afd2
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
mov ecx, dword [esp + 0x50]
cmp ecx, ebx
je 0x402c9e
mov edx, dword [0x4192c8]
lea eax, [esp + 0x2c]
push edx
push ebx
push eax
call fcn.00402df0
mov ecx, dword [esp + 0x30]
cmp ecx, ebx
je 0x402cc2
mov al, byte [ecx - 1]
cmp al, bl
je 0x402cb8
cmp al, 0xff
je 0x402cb8
dec al
mov byte [ecx - 1], al
jmp 0x402cc2
dec ecx
push ecx
call fcn.0040afd2
add esp, 4
mov ecx, dword [esp + 0x3c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret