Function at 0x4061e5
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x484324
call fcn.00483210
sub esp, 0x54
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov ecx, edi
call fcn.00407648
test al, al
je 0x4062aa
mov ecx, esi
call fcn.00406145
lea ebx, [edi + 8]
lea ecx, [esi + 0x28]
push ebx
call fcn.00402b82
mov ecx, ebx
mov byte [esi + 0x25], 1
call fcn.004077c9
test al, al
je 0x406271
cmp word [edi + 0xc], 0
jne 0x406271
mov ax, word [ebx]
and word [ebp - 0x1a], 0
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x20]
mov word [ebp - 0x1e], 0x3a
mov word [ebp - 0x1c], 0x5c
call fcn.004082b0
test al, al
je 0x406271
mov eax, dword [ebp - 0x18]
mov dword [esi], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 4], eax
jmp 0x406674
or dword [ebp - 0x60], 0xffffffff
and dword [ebp - 4], 0
push edi
lea ecx, [ebp - 0x60]
call fcn.00406db2
test al, al
jne 0x40628a
xor bl, bl
jmp 0x40629d
cmp byte [ebp - 0x5b], 0
je 0x40629b
mov eax, dword [ebp - 0x58]
mov dword [esi], eax
mov eax, dword [ebp - 0x54]
mov dword [esi + 4], eax
mov bl, 1
lea ecx, [ebp - 0x60]
call fcn.00406983
jmp 0x40662d
mov ecx, edi
call fcn.004078be
mov ebx, eax
test ebx, ebx
jl 0x40646c
cmp word [edi + ebx*2 + 2], 0
je 0x40646c
lea eax, [edi + ebx*2]
lea ecx, [ebp - 0x2c]
push eax
call fcn.00402ad1
push edi
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 1
call fcn.00402ad1
cmp ebx, dword [ebp - 0x34]
mov byte [ebp - 4], 2
jae 0x4062f7
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x34], ebx
and word [eax + ebx*2], 0
mov eax, dword [ebp - 0x28]
cmp eax, 6
jbe 0x406314
mov ecx, dword [ebp - 0x2c]
mov edx, 0x48b4c8
lea ecx, [ecx + eax*2 - 0xc]
call fcn.004021b2
test al, al
jne 0x406321
push str.:_DATA
lea ecx, [ebp - 0x2c]
call fcn.00402cc0
mov ecx, dword [ebp - 0x38]
call fcn.004077c9
test al, al
mov eax, dword [ebp - 0x38]
je 0x406366
cmp ebx, 2
je 0x406341
cmp ebx, 3
jne 0x406366
cmp word [eax + 4], 0x5c
jne 0x406366
mov ecx, esi
call fcn.00406145
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 0x406378
lea eax, [ebp - 0x38]
push eax
call fcn.00402be6
jmp 0x406378
push eax
mov ecx, esi
call fcn.004061e5
test al, al
je 0x40645a
xor edi, edi
and word [esi + 0x20], 0xfbef
or dword [ebp - 0x60], 0xffffffff
mov dword [esi], edi
mov dword [esi + 4], edi
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x5c]
push eax
mov byte [ebp - 4], 3
call fcn.00402b14
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 4
call fcn.00402a8d
lea eax, [ebp + 0xb]
lea ecx, [ebp - 0x60]
push eax
lea eax, [ebp - 0x50]
push eax
mov byte [ebp - 4], 5
call fcn.00406105
test al, al
je 0x4063ef
cmp byte [ebp + 0xb], 0
je 0x4063e7
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x50]
call fcn.004020b6
test al, al
jne 0x4063f3
push dword [ebp - 0x50]
mov byte [ebp - 4], 4
call fcn.00401bf2
pop ecx
lea ecx, [ebp - 0x50]
call fcn.00402a8d
jmp 0x4063a3
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
jmp 0x406429
mov ecx, dword [ebp - 0x4c]
cmp ecx, 7
jbe 0x40640c
lea eax, [ecx - 6]
cmp eax, ecx
jae 0x40640c
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x4c], eax
mov word [ecx + eax*2], di
lea eax, [ebp - 0x50]
lea ecx, [esi + 0x28]
push eax
call fcn.00402d0c
mov eax, dword [ebp - 0x40]
mov byte [esi + 0x24], 1
mov dword [esi], eax
mov eax, dword [ebp - 0x3c]
mov dword [esi + 4], eax
mov bl, 1
push dword [ebp - 0x50]
call fcn.00401bf2
push dword [ebp - 0x5c]
call fcn.00401bf2
pop ecx
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00405d92
push dword [ebp - 0x38]
call fcn.00401bf2
push dword [ebp - 0x2c]
call fcn.00401bf2
pop ecx
pop ecx
jmp 0x40662d
push dword [ebp - 0x38]
call fcn.00401bf2
push dword [ebp - 0x2c]
call fcn.00401bf2
pop ecx
pop ecx
or dword [ebp - 0x10], 0xffffffff
push esi
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 6
call fcn.00405db2
test al, al
je 0x40648c
mov bl, 1
jmp 0x406625
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov dword [ebp - 0x1c], eax
je 0x4064b4
cmp eax, 0x35
je 0x4064b4
cmp eax, 0x43
je 0x4064b4
cmp eax, 0x7b
je 0x4064b4
cmp eax, 0xa1
jne 0x406623
mov ecx, edi
xor ebx, ebx
call fcn.004077f2
test al, al
je 0x4064c4
push 4
pop ebx
mov ax, word [edi]
cmp ax, 0x5c
je 0x4064d3
cmp ax, 0x2f
jne 0x40650f
cmp word [edi + 2], 0
jne 0x40650f
mov ecx, edi
call fcn.00406168
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406623
test bl, 0x10
je 0x406623
mov ecx, esi
call fcn.00406145
mov eax, dword [esi + 0x28]
and dword [esi + 0x2c], 0
and word [eax], 0
mov dword [esi + 0x20], ebx
jmp 0x406485
lea ecx, [edi + ebx*2]
mov dword [ebp + 8], ecx
call fcn.004075b8
test al, al
je 0x406573
cmp word [edi + ebx*2 + 6], 0
jne 0x406573
mov ecx, edi
call fcn.00406168
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406623
test bl, 0x10
je 0x406623
mov ecx, esi
call fcn.00406145
push dword [ebp + 8]
mov dword [esi + 0x20], ebx
add esi, 0x28
mov ecx, esi
call fcn.00402b82
push 2
pop eax
cmp dword [esi + 4], eax
jbe 0x406485
mov dword [esi + 4], eax
mov eax, dword [esi]
and word [eax + 4], 0
jmp 0x406485
mov ecx, edi
call fcn.0040776c
test eax, eax
jbe 0x406623
cmp word [edi + eax*2], 0
lea ecx, [edi + eax*2]
mov dword [ebp - 0x14], ecx
je 0x406623
call fcn.00407570
test eax, eax
jge 0x406623
push edi
lea ecx, [ebp - 0x44]
call fcn.00402ad1
push 0x5c
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 7
call fcn.00401089
push 0x2a
lea ecx, [ebp - 0x44]
call fcn.00401089
and byte [ebp + 0xb], 0
push esi
push dword [ebp - 0x44]
lea ecx, [ebp - 0x10]
call fcn.00405db2
test al, al
je 0x4065f8
mov eax, dword [esi + 0x28]
lea ebx, [esi + 0x28]
push 0x48b364
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
pop ecx
test eax, eax
pop ecx
jne 0x4065f4
push dword [ebp - 0x14]
mov ecx, ebx
jmp 0x40665e
mov byte [ebp + 0xb], 1
mov ecx, edi
call fcn.00406168
cmp byte [ebp + 0xb], 0
mov ebx, eax
jne 0x406640
cmp ebx, 0xffffffff
je 0x406611
test bl, 0x10
jne 0x406640
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x44]
call fcn.00401bf2
pop ecx
xor bl, bl
lea ecx, [ebp - 0x10]
call fcn.00405d92
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.00406145
cmp ebx, 0xffffffff
je 0x406651
mov dword [esi + 0x20], ebx
jmp 0x406658
mov dword [esi + 0x20], 0x10
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.00402b82
push dword [ebp - 0x44]
call fcn.00401bf2
pop ecx
lea ecx, [ebp - 0x10]
call fcn.00405d92
mov al, 1
jmp 0x40662f