Function at 0x40d250
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4435c1
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x4587e8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x30], eax
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
lea esi, [eax + 0xd8]
mov dword [ebp - 0x2c], 0
cmp dword [esi + 0x10], 0
mov dword [ebp - 0x38], edi
je 0x40d2dc
cmp dword [esi + 0x14], 8
jb 0x40d2a6
mov eax, dword [esi]
jmp 0x40d2a8
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete al
test al, al
je 0x40d2dc
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
push esi
mov ecx, edi
mov word [edi], ax
call fcn.00402ff0
jmp 0x40d4a3
call fcn.00411630
test eax, eax
lea eax, [ebp - 0x28]
push eax
je 0x40d332
mov ecx, dword [ebp - 0x30]
call fcn.0040cd80
mov ebx, eax
mov dword [ebp - 4], 1
cmp esi, ebx
je 0x40d45f
cmp dword [esi + 0x14], 8
jb 0x40d312
push dword [esi]
call fcn.00423c7d
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
push ebx
mov ecx, esi
mov word [esi], ax
call fcn.00402d10
jmp 0x40d45f
call fcn.0040d060
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], 2
cmp esi, eax
je 0x40d373
cmp dword [esi + 0x14], 8
jb 0x40d358
push dword [esi]
call fcn.00423c7d
mov eax, dword [ebp - 0x34]
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], cx
push eax
mov ecx, esi
call fcn.00402d10
mov byte [ebp - 4], 0
cmp dword [ebp - 0x14], 8
jb 0x40d388
push dword [ebp - 0x28]
call fcn.00423c7d
add esp, 4
xor eax, eax
mov word [ebp - 0x28], ax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
test eax, eax
je 0x40d484
mov eax, dword [ebx + 0x14]
cmp eax, 8
jb 0x40d3b3
mov ecx, dword [ebx]
jmp 0x40d3b5
mov ecx, ebx
mov edx, 0x5c
cmp dx, word [ecx]
mov edx, 0x2f
je 0x40d3e4
cmp eax, 8
jb 0x40d3cd
mov eax, dword [ebx]
jmp 0x40d3cf
mov eax, ebx
cmp dx, word [eax]
je 0x40d3e4
push 0x44fdb4
mov ecx, esi
call fcn.004027b0
mov ecx, eax
jmp 0x40d3e6
mov ecx, esi
push 0xffffffffffffffff
push 0
push ebx
call fcn.00402db0
cmp esi, eax
je 0x40d400
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
call fcn.00402ff0
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax + 0xe8]
dec ebx
cmp dword [esi + 0x10], ebx
ja 0x40d419
push str.invalid_string_position
call fcn.0042341c
cmp dword [esi + 0x14], 8
jb 0x40d423
mov eax, dword [esi]
jmp 0x40d425
mov eax, esi
mov ecx, 0x5c
cmp cx, word [eax + ebx*2]
je 0x40d442
push ebx
mov ecx, esi
call fcn.00406b10
mov ecx, 0x2f
cmp cx, word [eax]
jne 0x40d484
push ebx
push 0
lea eax, [ebp - 0x28]
push eax
mov ecx, esi
call fcn.00402860
mov dword [ebp - 4], 3
push eax
mov ecx, esi
call fcn.00402740
mov byte [ebp - 4], 0
cmp dword [ebp - 0x14], 8
jb 0x40d474
push dword [ebp - 0x28]
call fcn.00423c7d
add esp, 4
xor eax, eax
mov word [ebp - 0x28], ax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 7
push 0xffffffffffffffff
push 0
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
push esi
mov ecx, edi
mov word [edi], ax
call fcn.00402ff0
mov dword [ebp - 4], 0
mov dword [ebp - 0x2c], 1
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00423c82
mov esp, ebp
pop ebp
ret 8