Function at 0x401850
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x43a8d6
mov eax, dword fs:[0]
push eax
sub esp, 0x620
mov eax, dword [0x44c274]
xor eax, esp
mov dword [esp + 0x61c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44c274]
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 [0x44e33c]
mov edx, dword [eax + 0xc]
mov ecx, 0x44e33c
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 [0x44ded0]
movzx ecx, word [esp + 0x28]
sub ecx, 1
push ecx
lea edx, [esp + 0x1c]
push 0x43f430
push edx
call fcn.00401670
mov eax, dword [esp + 0x24]
add esp, 0xc
push eax
call dword [0x44dec0]
cmp eax, 5
jne 0x401966
push 1
push 0x43f42c
lea ecx, [esp + 0x20]
call fcn.004013f0
push 0xe
push str.KVPortable.ini
lea ecx, [esp + 0x20]
call fcn.004013f0
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401abb
mov esi, dword [esp + 0x18]
add esi, 0xfffffff0
push esi
call fcn.00401340
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 0x401af0
mov ecx, dword [esi]
push esi
jmp 0x401ae9
lea ecx, [esp + 0x230]
push ecx
push 0x1ff
mov byte [esp + 0x1f], bl
mov word [esp + 0x238], bx
call dword [0x44decc]
test eax, eax
je 0x401abb
mov edx, dword [0x43f424]
mov ax, word [0x43f428]
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 [0x44dec0]
cmp eax, 5
jne 0x401a40
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x20]
call fcn.00401710
push 1
push 0x43f42c
lea ecx, [esp + 0x24]
mov byte [esp + 0x644], 1
call fcn.004013f0
push 0xe
push str.KVPortable.ini
lea ecx, [esp + 0x24]
call fcn.004013f0
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401a15
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 0x401a40
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 0x401a40
cmp word [esi], bx
jne 0x4019b0
mov al, byte [esp + 0x17]
cmp al, bl
je 0x401abb
movzx edx, al
push edx
lea eax, [esp + 0x1c]
push str._c:_
push eax
call fcn.00401670
add esp, 0xc
push str.KVPortable.ini
lea ecx, [esp + 0x1c]
call fcn.00401690
mov esi, dword [esp + 0x18]
add esi, 0xfffffff0
push esi
call fcn.00401340
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 0x401af0
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
jmp 0x401af0
push ebp
push edi
call fcn.004017c0
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 0x401af0
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.004144f2
add esp, 0x62c
ret