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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x9c0908
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.0040e430
xor ebx, ebx
mov dword [ebp + 8], eax
cmp eax, ebx
jl 0x40d4e2
cmp word [edi + eax*2 + 2], bx
lea eax, [edi + eax*2]
je 0x40d4e2
push eax
lea ecx, [ebp - 0x2c]
call fcn.00409d50
push edi
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], ebx
call fcn.00409d50
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 1
cmp eax, dword [ebp - 0x1c]
jae 0x40d2a1
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 0x40d2bf
mov ecx, dword [ebp - 0x2c]
lea eax, [ecx + eax*2 - 0xc]
push str.:_DATA
push eax
call fcn.00409790
test al, al
jne 0x40d2cc
push str.:_DATA
lea ecx, [ebp - 0x2c]
call fcn.0040a270
mov edx, dword [ebp - 0x20]
push edx
call fcn.0040e2a0
mov ecx, dword [ebp - 0x20]
test al, al
je 0x40d32c
mov eax, dword [ebp + 8]
cmp eax, 2
je 0x40d2f0
cmp eax, 3
jne 0x40d32c
cmp word [ecx + 4], 0x5c
jne 0x40d32c
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 0x40d340
lea eax, [ebp - 0x20]
push eax
call fcn.00409f40
jmp 0x40d340
mov edx, dword [ebp + 0xc]
push edx
push ecx
mov ecx, esi
call fcn.0040d230
cmp al, bl
je 0x40d4cd
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.00409e20
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.00409cd0
lea ecx, [ebp + 0xf]
push ecx
lea edx, [ebp - 0x54]
push edx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.0040cf80
test al, al
je 0x40d3d5
cmp byte [ebp + 0xf], bl
je 0x40d413
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x54]
push eax
push ecx
call fcn.00409650
test al, al
jne 0x40d459
mov edx, dword [ebp - 0x54]
push edx
mov byte [ebp - 4], 3
call fcn.0095b1b1
add esp, 4
lea ecx, [ebp - 0x54]
call fcn.00409cd0
lea eax, [ebp + 0xf]
push eax
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.0040cf80
test al, al
jne 0x40d387
mov edx, dword [ebp - 0x54]
push edx
call fcn.0095b1b1
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.0040d200
mov eax, dword [ebp - 0x20]
push eax
call fcn.0095b1b1
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0095b1b1
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.0095b1b1
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.0040d200
mov eax, dword [ebp - 0x20]
push eax
call fcn.0095b1b1
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0095b1b1
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 0x40d474
lea eax, [ecx - 6]
cmp eax, ecx
jae 0x40d474
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.0040a1e0
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.0095b1b1
add esp, 4
lea ecx, [ebp - 0x3c]
call fcn.0040d200
mov eax, dword [ebp - 0x20]
push eax
call fcn.0095b1b1
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0095b1b1
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.0095b1b1
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0095b1b1
add esp, 8
mov dword [ebp - 0x10], 0xffffffff
push edi
mov dword [ebp - 4], 5
mov dword [ebp + 8], ebx
call fcn.0040e2d0
test al, al
je 0x40d504
mov dword [ebp + 8], 4
mov ecx, dword [ebp + 8]
lea eax, [edi + ecx*2]
push eax
mov dword [ebp - 0x14], eax
call fcn.0040e0b0
test al, al
je 0x40d596
mov edx, dword [ebp + 8]
cmp word [edi + edx*2 + 6], bx
jne 0x40d596
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d70d
test al, 0x10
je 0x40d70d
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.00409ed0
mov eax, 2
cmp dword [esi + 0x2c], eax
jbe 0x40d579
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.0040d050
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 0x40d5a7
cmp eax, 0x2f
jne 0x40d70d
push edi
cmp word [edi + 2], bx
jne 0x40d606
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d70d
test al, 0x10
je 0x40d70d
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.0040e230
cmp eax, ebx
jbe 0x40d70d
lea eax, [edi + eax*2]
mov dword [ebp - 0x14], eax
cmp word [eax], bx
je 0x40d70d
push eax
call fcn.0040e020
test eax, eax
jns 0x40d70d
push edi
mov ecx, esi
call fcn.0040d050
test al, al
je 0x40d665
mov eax, dword [ebp - 0x14]
lea ecx, [esi + 0x28]
push eax
call fcn.00409ed0
lea ecx, [ebp - 0x10]
call fcn.0040c6f0
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.00409d50
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 6
call fcn.0040ab60
push 0x2a
lea ecx, [ebp - 0x38]
call fcn.0040cbf0
mov ecx, dword [ebp - 0x38]
push esi
push ecx
lea ecx, [ebp - 0x10]
mov byte [ebp + 0xb], bl
call fcn.0040cd80
test al, al
je 0x40d6e6
lea eax, [esi + 0x28]
push 0x9c4850
push eax
mov dword [ebp + 8], eax
call fcn.0040ab90
test al, al
je 0x40d6e2
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
push edx
call fcn.00409ed0
mov eax, dword [ebp - 0x38]
push eax
call fcn.0095b1b1
add esp, 4
lea ecx, [ebp - 0x10]
call fcn.0040c6f0
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.0040d020
mov edx, eax
cmp byte [ebp + 0xb], bl
jne 0x40d768
cmp edx, 0xffffffff
je 0x40d6fd
test dl, 0x10
jne 0x40d768
mov ecx, dword [ebp - 0x38]
push ecx
mov byte [ebp - 4], 5
call fcn.0095b1b1
add esp, 4
push esi
push edi
lea ecx, [ebp - 0x10]
call fcn.0040cd80
mov byte [ebp + 0xb], al
cmp byte [ebp + 0xc], bl
je 0x40d7b5
cmp al, bl
je 0x40d7b5
mov ecx, dword [esi + 0x20]
shr ecx, 0xa
test cl, 1
je 0x40d7b5
push edi
mov ecx, esi
call fcn.0040d050
mov bl, al
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x40d753
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.0040cce0
cmp edx, 0xffffffff
je 0x40d779
mov dword [esi + 0x20], edx
jmp 0x40d780
mov dword [esi + 0x20], 0x10
mov edx, dword [ebp - 0x14]
lea ecx, [esi + 0x28]
push edx
call fcn.00409ed0
mov eax, dword [ebp - 0x38]
push eax
call fcn.0095b1b1
add esp, 4
lea ecx, [ebp - 0x10]
call fcn.0040c6f0
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 0x40d7c7
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