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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x991718
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov esi, ecx
call fcn.0040e3c0
xor ebx, ebx
mov dword [ebp + 8], eax
cmp eax, ebx
jl 0x40d472
cmp word [edi + eax*2 + 2], bx
lea eax, [edi + eax*2]
je 0x40d472
push eax
lea ecx, [ebp - 0x2c]
call fcn.00409cf0
push edi
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], ebx
call fcn.00409cf0
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 1
cmp eax, dword [ebp - 0x1c]
jae 0x40d231
mov edx, dword [ebp - 0x20]
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov word [edx + eax*2], cx
mov eax, dword [ebp - 0x28]
cmp eax, 6
jbe 0x40d24f
mov ecx, dword [ebp - 0x2c]
lea eax, [ecx + eax*2 - 0xc]
push str.:_DATA
push eax
call fcn.00409730
test al, al
jne 0x40d25c
push str.:_DATA
lea ecx, [ebp - 0x2c]
call fcn.0040a210
mov edx, dword [ebp - 0x20]
push edx
call fcn.0040e230
mov ecx, dword [ebp - 0x20]
test al, al
je 0x40d2bc
mov eax, dword [ebp + 8]
cmp eax, 2
je 0x40d280
cmp eax, 3
jne 0x40d2bc
cmp word [ecx + 4], 0x5c
jne 0x40d2bc
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov word [esi + 0x24], bx
mov edx, dword [esi + 0x28]
lea ecx, [esi + 0x28]
xor edi, edi
mov dword [ecx + 4], ebx
mov word [edx], di
cmp eax, 2
jne 0x40d2d0
lea eax, [ebp - 0x20]
push eax
call fcn.00409ee0
jmp 0x40d2d0
mov edx, dword [ebp + 0xc]
push edx
push ecx
mov ecx, esi
call fcn.0040d1c0
cmp al, bl
je 0x40d45d
and dword [esi + 0x20], 0xfffffbef
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [ebp - 0x3c], 0xffffffff
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.00409dc0
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.00409c70
lea ecx, [ebp + 0xf]
push ecx
lea edx, [ebp - 0x54]
push edx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.0040cf20
test al, al
je 0x40d365
cmp byte [ebp + 0xf], bl
je 0x40d3a3
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x54]
push eax
push ecx
call fcn.004095f0
test al, al
jne 0x40d3e9
mov edx, dword [ebp - 0x54]
push edx
mov byte [ebp - 4], 3
call fcn.0092bf61
add esp, 4
lea ecx, [ebp - 0x54]
call fcn.00409c70
lea eax, [ebp + 0xf]
push eax
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.0040cf20
test al, al
jne 0x40d317
mov edx, dword [ebp - 0x54]
push edx
call fcn.0092bf61
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.0040d190
mov eax, dword [ebp - 0x20]
push eax
call fcn.0092bf61
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0092bf61
add esp, 8
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x54]
push edx
call fcn.0092bf61
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.0040d190
mov eax, dword [ebp - 0x20]
push eax
call fcn.0092bf61
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0092bf61
add esp, 8
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x50]
cmp ecx, 7
jbe 0x40d404
lea eax, [ecx - 6]
cmp eax, ecx
jae 0x40d404
mov ecx, dword [ebp - 0x54]
xor edx, edx
mov dword [ebp - 0x50], eax
mov word [ecx + eax*2], dx
lea edx, [ebp - 0x54]
lea ecx, [esi + 0x28]
push edx
call fcn.0040a180
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
push edx
mov dword [esi], eax
mov dword [esi + 4], ecx
mov byte [esi + 0x24], 1
call fcn.0092bf61
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.0040d190
mov eax, dword [ebp - 0x20]
push eax
call fcn.0092bf61
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0092bf61
add esp, 8
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp - 0x20]
push edx
call fcn.0092bf61
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0092bf61
add esp, 8
mov dword [ebp - 0x10], 0xffffffff
push edi
mov dword [ebp - 4], 5
mov dword [ebp + 8], ebx
call fcn.0040e260
test al, al
je 0x40d494
mov dword [ebp + 8], 4
mov ecx, dword [ebp + 8]
lea eax, [edi + ecx*2]
push eax
mov dword [ebp - 0x14], eax
call fcn.0040e040
test al, al
je 0x40d526
mov edx, dword [ebp + 8]
cmp word [edi + edx*2 + 6], bx
jne 0x40d526
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d69d
test al, 0x10
je 0x40d69d
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x14]
push eax
lea ecx, [esi + 0x28]
mov word [esi + 0x24], bx
call fcn.00409e70
mov eax, 2
cmp dword [esi + 0x2c], eax
jbe 0x40d509
mov ecx, dword [esi + 0x28]
xor edx, edx
mov dword [esi + 0x2c], eax
mov word [ecx + 4], dx
push edi
mov ecx, esi
call fcn.0040cfe0
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
movzx eax, word [edi]
cmp eax, 0x5c
je 0x40d537
cmp eax, 0x2f
jne 0x40d69d
push edi
cmp word [edi + 2], bx
jne 0x40d596
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d69d
test al, 0x10
je 0x40d69d
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov word [esi + 0x24], bx
mov ecx, dword [esi + 0x28]
mov dword [esi + 0x2c], ebx
xor edx, edx
pop edi
mov word [ecx], dx
mov dword [esi + 0x20], eax
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
call fcn.0040e1c0
cmp eax, ebx
jbe 0x40d69d
lea eax, [edi + eax*2]
mov dword [ebp - 0x14], eax
cmp word [eax], bx
je 0x40d69d
push eax
call fcn.0040dfb0
test eax, eax
jns 0x40d69d
push edi
mov ecx, esi
call fcn.0040cfe0
test al, al
je 0x40d5f5
mov eax, dword [ebp - 0x14]
lea ecx, [esi + 0x28]
push eax
call fcn.00409e70
lea ecx, [ebp - 0x10]
call fcn.0040c690
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
push edi
lea ecx, [ebp - 0x38]
call fcn.00409cf0
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 6
call fcn.0040ab00
push 0x2a
lea ecx, [ebp - 0x38]
call fcn.0040cb90
mov ecx, dword [ebp - 0x38]
push esi
push ecx
lea ecx, [ebp - 0x10]
mov byte [ebp + 0xb], bl
call fcn.0040cd20
test al, al
je 0x40d676
lea eax, [esi + 0x28]
push 0x995850
push eax
mov dword [ebp + 8], eax
call fcn.0040ab30
test al, al
je 0x40d672
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
push edx
call fcn.00409e70
mov eax, dword [ebp - 0x38]
push eax
call fcn.0092bf61
add esp, 4
lea ecx, [ebp - 0x10]
call fcn.0040c690
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov byte [ebp + 0xb], 1
push edi
call fcn.0040cfc0
mov edx, eax
cmp byte [ebp + 0xb], bl
jne 0x40d6f8
cmp edx, 0xffffffff
je 0x40d68d
test dl, 0x10
jne 0x40d6f8
mov ecx, dword [ebp - 0x38]
push ecx
mov byte [ebp - 4], 5
call fcn.0092bf61
add esp, 4
push esi
push edi
lea ecx, [ebp - 0x10]
call fcn.0040cd20
mov byte [ebp + 0xb], al
cmp byte [ebp + 0xc], bl
je 0x40d745
cmp al, bl
je 0x40d745
mov ecx, dword [esi + 0x20]
shr ecx, 0xa
test cl, 1
je 0x40d745
push edi
mov ecx, esi
call fcn.0040cfe0
mov bl, al
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x40d6e3
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
call fcn.0040cc80
cmp edx, 0xffffffff
je 0x40d709
mov dword [esi + 0x20], edx
jmp 0x40d710
mov dword [esi + 0x20], 0x10
mov edx, dword [ebp - 0x14]
lea ecx, [esi + 0x28]
push edx
call fcn.00409e70
mov eax, dword [ebp - 0x38]
push eax
call fcn.0092bf61
add esp, 4
lea ecx, [ebp - 0x10]
call fcn.0040c690
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x10]
cmp ecx, 0xffffffff
je 0x40d757
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, byte [ebp + 0xb]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8