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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 8], 0xffffffff
cmp dword [ebp + 8], 0
jne 0x40a8c4
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040c3dc
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40a87b
jmp 0x40aa68
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 4]
cmp eax, dword [ebp - 8]
je 0x40a8c4
mov ecx, dword [ebp + 0x14]
cmp dword [ecx + 4], 0x1b5de6b6
je 0x40a8c4
cmp dword [ebp - 8], 0x1b5de6b6
je 0x40a8c4
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
push eax
movsx ecx, word [ebp + 0x10]
push ecx
push 1
call fcn.00410c1b
add esp, 0x14
mov dword [ebp - 0xc], eax
jmp 0x40aa68
mov edx, dword [ebp + 0x14]
movsx eax, word [edx + 8]
sub eax, 1
imul eax, eax, 0x94
add eax, 0xac
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
push eax
call fcn.00414962
add esp, 4
sub eax, 0x41
push eax
call fcn.00410388
add esp, 8
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 4]
jae 0x40a932
cmp dword [0x436904], 0
jne 0x40a932
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
push edx
movsx eax, word [ebp + 0x10]
push eax
push 2
call fcn.00410c1b
add esp, 0x14
mov dword [ebp - 0xc], eax
jmp 0x40aa68
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.0040b299
add esp, 4
mov edx, dword [ebp + 0x18]
push edx
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov dx, word [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0040bfb4
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40a975
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.0040b0f7
add esp, 4
jmp 0x40aa68
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0040b4ce
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x40a9a1
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00413941
add esp, 4
mov dword [ebp - 0x14], 0xffffffff
mov edx, dword [ebp + 0x14]
push edx
call fcn.0040b0f7
add esp, 4
cmp dword [ebp - 0xc], 0
je 0x40aa12
movsx eax, byte [0x4366fc]
test eax, eax
je 0x40a9e2
push 0x4366fc
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40a9e2
mov ecx, dword [0x42f7d8]
push ecx
push 0x4366fc
call fcn.0040c730
add esp, 8
movsx edx, byte [0x436800]
test edx, edx
je 0x40aa10
push 0x436800
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40aa10
mov eax, dword [0x42f7dc]
push eax
push 0x436800
call fcn.0040c730
add esp, 8
jmp 0x40aa68
cmp dword [ebp + 8], 0
jne 0x40aa68
mov ecx, dword [0x42f7d8]
push ecx
push 0x4366fc
call fcn.0040c730
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40aa37
jmp 0x40aa68
movsx edx, byte [0x436800]
test edx, edx
je 0x40aa68
push 0x436800
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40aa68
mov eax, dword [0x42f7dc]
push eax
push 0x436800
call fcn.0040c730
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x40aa7a
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00413941
add esp, 4
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret