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

Disassembly:
push 0x2f0
mov eax, 0x47bac4
call fcn.0044ef46
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2ec], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2f0], eax
mov eax, dword [ebp + 0x14]
push 7
mov dword [ebp - 0x2f4], eax
xor ebx, ebx
pop eax
xor ecx, ecx
mov dword [ebp - 0x2fc], ebx
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x244], ebx
mov word [ebp - 0x254], cx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x260], eax
xor eax, eax
mov dword [ebp - 0x264], ebx
mov word [ebp - 0x274], ax
mov byte [ebp - 4], 1
xor edi, edi
mov ecx, dword [eax + 0x4ad780]
cmp ecx, dword [ebp + 0xc]
je 0x40d693
add eax, 0x24
inc edi
cmp eax, 0x360
jb 0x40d67b
jmp 0x40d6dc
mov eax, edi
imul eax, eax, 0x24
lea esi, [eax + 0x4ad780]
mov eax, dword [esi]
push 0xffffffffffffffff
mov dword [ebp - 0x278], eax
push ebx
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0x274]
call fcn.004030c3
mov al, byte [esi + 0x20]
mov byte [ebp - 0x258], al
mov al, byte [esi + 0x21]
mov byte [ebp - 0x257], al
mov al, byte [esi + 0x22]
mov byte [ebp - 0x256], al
mov al, byte [esi + 0x23]
mov byte [ebp - 0x255], al
cmp edi, 0x18
jb 0x40d72d
push 0x4916dc
push 4
push 0xb
pop edi
call fcn.0040b067
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
push 0x4ad760
lea ecx, [ebp - 0x254]
call fcn.004030c3
mov ecx, dword [ebp - 0x2ec]
lea eax, [ebp - 0x254]
push eax
call fcn.00403afe
push ebx
push 1
lea ecx, [ebp - 0x274]
call fcn.00403211
push ebx
push 1
jmp 0x40da0a
cmp dword [ebp + 0x18], 1
jne 0x40d73b
cmp byte [ebp - 0x258], bl
je 0x40d6f2
xor eax, eax
push 0x206
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push ebx
push eax
call fcn.0043fd80
lea ebx, [ebp - 0x21c]
call fcn.0040c09b
mov eax, ebx
push eax
push 0x491710
push 0xb
pop edx
push 2
pop esi
call fcn.0040b07c
add esp, 0x14
push 7
pop esi
xor eax, eax
push 0xffffffffffffffff
xor ebx, ebx
mov word [ebp - 0x2cc], ax
push ebx
lea eax, [ebp - 0x274]
push eax
lea ecx, [ebp - 0x2cc]
mov dword [ebp - 0x2b8], esi
mov dword [ebp - 0x2bc], ebx
call fcn.004030c3
xor eax, eax
mov dword [ebp - 0x29c], esi
mov dword [ebp - 0x2a0], ebx
mov word [ebp - 0x2b0], ax
cmp dword [ebp + 0x18], 1
mov byte [ebp - 4], 3
jne 0x40d7e0
cmp byte [ebp - 0x257], bl
je 0x40d7e0
push 0xffffffffffffffff
push ebx
push 0x4adb34
lea ecx, [ebp - 0x2b0]
call fcn.004030c3
xor eax, eax
mov dword [ebp - 0x280], esi
mov dword [ebp - 0x284], ebx
mov word [ebp - 0x294], ax
cmp dword [ebp + 0x18], 2
mov byte [ebp - 4], 4
jne 0x40d812
push 0xffffffffffffffff
push ebx
push 0x4adb6c
lea ecx, [ebp - 0x294]
call fcn.004030c3
mov byte [ebp - 4], 5
xor eax, eax
mov word [ebp - 0x238], ax
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x228], ebx
call fcn.0040315e
mov esi, 0x4adafc
lea ebx, [ebp - 0x238]
mov byte [ebp - 4], 6
call fcn.0040f8c0
mov esi, dword [ebp - 0x2f0]
call fcn.0040f8c0
cmp dword [ebp - 0x2a0], 0
je 0x40d870
lea esi, [ebp - 0x2b0]
call fcn.0040f8c0
cmp dword [ebp - 0x284], 0
je 0x40d8d3
lea esi, [ebp - 0x294]
lea ebx, [ebp - 0x238]
call fcn.0040f8c0
and dword [ebp - 0x2d8], 0
xor eax, eax
mov dword [ebp - 0x2d4], 7
mov word [ebp - 0x2e8], ax
push dword [ebp + 0x1c]
lea edi, [ebp - 0x2e8]
push 0x491458
mov byte [ebp - 4], 7
call fcn.00432dbc
pop ecx
pop ecx
mov esi, edi
call fcn.0040f8c0
push 0
push 1
mov ecx, edi
mov byte [ebp - 4], 6
call fcn.00403211
lea esi, [ebp - 0x2cc]
lea ebx, [ebp - 0x238]
call fcn.0040f8c0
cmp dword [ebp - 0x224], 8
mov eax, dword [ebp - 0x238]
jae 0x40d8f5
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d905
test al, 0x10
jne 0x40d91f
cmp dword [ebp - 0x224], 8
mov edi, dword [ebp - 0x238]
jae 0x40d91a
lea edi, [ebp - 0x238]
call fcn.0043296d
mov esi, dword [ebp - 0x2f4]
lea ebx, [ebp - 0x238]
call fcn.0040f8c0
push 0xffffffffffffffff
xor esi, esi
push esi
mov eax, ebx
push eax
lea ecx, [ebp - 0x254]
call fcn.004030c3
mov ecx, dword [ebp - 0x2ec]
lea eax, [ebp - 0x254]
push eax
call fcn.00403afe
xor edi, edi
push esi
inc edi
push edi
mov ecx, ebx
call fcn.00403211
push esi
push edi
lea ecx, [ebp - 0x294]
call fcn.00403211
push esi
push edi
lea ecx, [ebp - 0x2b0]
call fcn.00403211
push esi
push edi
lea ecx, [ebp - 0x2cc]
call fcn.00403211
push esi
push edi
lea ecx, [ebp - 0x274]
call fcn.00403211
push esi
push edi
jmp 0x40da0a
lea ecx, [ebp - 0x254]
call fcn.00403211
mov eax, dword [ebp - 0x2ec]
call fcn.0044efa2
ret 0x18