Function at 0x401820
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4384c6
mov eax, dword fs:[0]
push eax
sub esp, 0x620
mov eax, dword [0x448270]
xor eax, esp
mov dword [esp + 0x61c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x448270]
xor eax, esp
push eax
lea eax, [esp + 0x634]
mov dword fs:[0], eax
mov edi, dword [esp + 0x644]
mov ebp, dword [esp + 0x648]
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov eax, dword [0x44a334]
mov edx, dword [eax + 0xc]
mov ecx, 0x44a334
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
push 0x104
lea eax, [esp + 0x2c]
push eax
push ebp
mov dword [esp + 0x648], ebx
call dword [0x449ed8]
movzx ecx, word [esp + 0x28]
sub ecx, 1
push ecx
lea edx, [esp + 0x1c]
push 0x43c428
push edx
call fcn.00401640
mov eax, dword [esp + 0x24]
add esp, 0xc
push eax
call dword [0x449ec8]
cmp eax, 5
jne 0x401936
push 1
push 0x43c424
lea ecx, [esp + 0x20]
call fcn.004013c0
push 0xe
push str.KVPortable.ini
lea ecx, [esp + 0x20]
call fcn.004013c0
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401a8b
mov esi, dword [esp + 0x18]
add esi, 0xfffffff0
push esi
call fcn.00401330
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov dword [esp + 0x63c], 0xffffffff
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x401ac0
mov ecx, dword [esi]
push esi
jmp 0x401ab9
lea ecx, [esp + 0x230]
push ecx
push 0x1ff
mov byte [esp + 0x1f], bl
mov word [esp + 0x238], bx
call dword [0x449ed4]
test eax, eax
je 0x401a8b
mov edx, dword [0x43c41c]
mov ax, word [0x43c420]
mov dword [esp + 0x20], edx
mov word [esp + 0x24], ax
lea esi, [esp + 0x230]
lea esp, [esp]
mov cx, word [esi]
lea edx, [esp + 0x20]
push edx
mov word [esp + 0x24], cx
call dword [0x449ec8]
cmp eax, 5
jne 0x401a10
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x20]
call fcn.004016e0
push 1
push 0x43c424
lea ecx, [esp + 0x24]
mov byte [esp + 0x644], 1
call fcn.004013c0
push 0xe
push str.KVPortable.ini
lea ecx, [esp + 0x24]
call fcn.004013c0
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4019e5
mov dl, byte [esp + 0x20]
mov byte [esp + 0x17], dl
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x63c], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401a10
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [esp]
mov cx, word [esi]
add esi, 2
test cx, cx
jne 0x401a10
cmp word [esi], bx
jne 0x401980
mov al, byte [esp + 0x17]
cmp al, bl
je 0x401a8b
movzx edx, al
push edx
lea eax, [esp + 0x1c]
push str._c:_
push eax
call fcn.00401640
add esp, 0xc
push str.KVPortable.ini
lea ecx, [esp + 0x1c]
call fcn.00401660
mov esi, dword [esp + 0x18]
add esi, 0xfffffff0
push esi
call fcn.00401330
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov dword [esp + 0x63c], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401ac0
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
jmp 0x401ac0
push ebp
push edi
call fcn.00401790
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 8
mov dword [esp + 0x63c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401ac0
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x634]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x61c]
xor ecx, esp
call fcn.00413d5c
add esp, 0x62c
ret