Function at 0x403f2b
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x424f14
call fcn.00424100
sub esp, 0x4c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov ecx, edi
call fcn.00404ab6
mov ebx, eax
test ebx, ebx
jl 0x4040ff
cmp word [edi + ebx*2 + 2], 0
je 0x4040ff
lea eax, [edi + ebx*2]
lea ecx, [ebp - 0x30]
push eax
call fcn.00402587
and dword [ebp - 4], 0
push edi
lea ecx, [ebp - 0x24]
call fcn.00402587
cmp ebx, dword [ebp - 0x20]
mov byte [ebp - 4], 1
jae 0x403f8a
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], ebx
and word [eax + ebx*2], 0
mov eax, dword [ebp - 0x2c]
cmp eax, 6
jbe 0x403fa7
mov ecx, dword [ebp - 0x30]
mov edx, 0x427690
lea ecx, [ecx + eax*2 - 0xc]
call fcn.0040218f
test al, al
jne 0x403fb4
push str.:_DATA
lea ecx, [ebp - 0x30]
call fcn.00402776
mov ecx, dword [ebp - 0x24]
call fcn.004049c1
test al, al
mov eax, dword [ebp - 0x24]
je 0x403ff9
cmp ebx, 2
je 0x403fd4
cmp ebx, 3
jne 0x403ff9
cmp word [eax + 4], 0x5c
jne 0x403ff9
mov ecx, esi
call fcn.00403ef9
mov eax, dword [esi + 0x28]
lea ecx, [esi + 0x28]
xor edi, edi
cmp ebx, 2
mov dword [ecx + 4], edi
mov word [eax], di
jne 0x40400b
lea eax, [ebp - 0x24]
push eax
call fcn.0040269c
jmp 0x40400b
push eax
mov ecx, esi
call fcn.00403f2b
test al, al
je 0x4040ed
xor edi, edi
and word [esi + 0x20], 0xfbef
or dword [ebp - 0x40], 0xffffffff
mov dword [esi], edi
mov dword [esi + 4], edi
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 2
call fcn.004025ca
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.00402543
lea eax, [ebp + 0xb]
lea ecx, [ebp - 0x40]
push eax
lea eax, [ebp - 0x58]
push eax
mov byte [ebp - 4], 4
call fcn.00403eb9
test al, al
je 0x404082
cmp byte [ebp + 0xb], 0
je 0x40407a
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x58]
call fcn.004020d1
test al, al
jne 0x404086
push dword [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.00402084
pop ecx
lea ecx, [ebp - 0x58]
call fcn.00402543
jmp 0x404036
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
jmp 0x4040bc
mov ecx, dword [ebp - 0x54]
cmp ecx, 7
jbe 0x40409f
lea eax, [ecx - 6]
cmp eax, ecx
jae 0x40409f
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x54], eax
mov word [ecx + eax*2], di
lea eax, [ebp - 0x58]
lea ecx, [esi + 0x28]
push eax
call fcn.004027c2
mov eax, dword [ebp - 0x48]
mov byte [esi + 0x24], 1
mov dword [esi], eax
mov eax, dword [ebp - 0x44]
mov dword [esi + 4], eax
mov bl, 1
push dword [ebp - 0x58]
call fcn.00402084
push dword [ebp - 0x3c]
call fcn.00402084
pop ecx
pop ecx
lea ecx, [ebp - 0x40]
call fcn.00403ca3
push dword [ebp - 0x24]
call fcn.00402084
push dword [ebp - 0x30]
call fcn.00402084
pop ecx
pop ecx
jmp 0x4042c0
push dword [ebp - 0x24]
call fcn.00402084
push dword [ebp - 0x30]
call fcn.00402084
pop ecx
pop ecx
or dword [ebp - 0x10], 0xffffffff
push esi
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 5
call fcn.00403cc3
test al, al
je 0x40411f
mov bl, 1
jmp 0x4042b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov dword [ebp - 0x18], eax
je 0x404147
cmp eax, 0x35
je 0x404147
cmp eax, 0x43
je 0x404147
cmp eax, 0x7b
je 0x404147
cmp eax, 0xa1
jne 0x4042b6
mov ecx, edi
xor ebx, ebx
call fcn.004049ea
test al, al
je 0x404157
push 4
pop ebx
mov ax, word [edi]
cmp ax, 0x5c
je 0x404166
cmp ax, 0x2f
jne 0x4041a2
cmp word [edi + 2], 0
jne 0x4041a2
mov ecx, edi
call fcn.00403f1c
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4042b6
test bl, 0x10
je 0x4042b6
mov ecx, esi
call fcn.00403ef9
mov eax, dword [esi + 0x28]
and dword [esi + 0x2c], 0
and word [eax], 0
mov dword [esi + 0x20], ebx
jmp 0x404118
lea ecx, [edi + ebx*2]
mov dword [ebp + 8], ecx
call fcn.004047b0
test al, al
je 0x404206
cmp word [edi + ebx*2 + 6], 0
jne 0x404206
mov ecx, edi
call fcn.00403f1c
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4042b6
test bl, 0x10
je 0x4042b6
mov ecx, esi
call fcn.00403ef9
push dword [ebp + 8]
mov dword [esi + 0x20], ebx
add esi, 0x28
mov ecx, esi
call fcn.00402638
push 2
pop eax
cmp dword [esi + 4], eax
jbe 0x404118
mov dword [esi + 4], eax
mov eax, dword [esi]
and word [eax + 4], 0
jmp 0x404118
mov ecx, edi
call fcn.00404964
test eax, eax
jbe 0x4042b6
cmp word [edi + eax*2], 0
lea ecx, [edi + eax*2]
mov dword [ebp - 0x14], ecx
je 0x4042b6
call fcn.00404768
test eax, eax
jge 0x4042b6
push edi
lea ecx, [ebp - 0x3c]
call fcn.00402587
push 0x5c
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.00401d7b
push 0x2a
lea ecx, [ebp - 0x3c]
call fcn.00401d7b
and byte [ebp + 0xb], 0
push esi
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x10]
call fcn.00403cc3
test al, al
je 0x40428b
mov eax, dword [esi + 0x28]
lea ebx, [esi + 0x28]
push 0x427648
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
pop ecx
test eax, eax
pop ecx
jne 0x404287
push dword [ebp - 0x14]
mov ecx, ebx
jmp 0x4042f1
mov byte [ebp + 0xb], 1
mov ecx, edi
call fcn.00403f1c
cmp byte [ebp + 0xb], 0
mov ebx, eax
jne 0x4042d3
cmp ebx, 0xffffffff
je 0x4042a4
test bl, 0x10
jne 0x4042d3
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x3c]
call fcn.00402084
pop ecx
xor bl, bl
lea ecx, [ebp - 0x10]
call fcn.00403ca3
mov al, bl
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
mov ecx, esi
call fcn.00403ef9
cmp ebx, 0xffffffff
je 0x4042e4
mov dword [esi + 0x20], ebx
jmp 0x4042eb
mov dword [esi + 0x20], 0x10
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.00402638
push dword [ebp - 0x3c]
call fcn.00402084
pop ecx
lea ecx, [ebp - 0x10]
call fcn.00403ca3
mov al, 1
jmp 0x4042c2