Function at 0x431790
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cbd20
mov eax, dword fs:[0]
push eax
sub esp, 0x814
mov eax, dword [0x4f6cdc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov ebx, ecx
mov edx, dword [ebx]
mov dword [ebp - 0x818], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x81c], 0
call eax
test al, al
je 0x431a1c
lea ecx, [ebx + 0x1018]
push ecx
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edx, [ebp - 0x81c]
push edx
push edi
mov edi, dword [ebp - 0x818]
push esi
push edi
call fcn.0049abc0
add esp, 0x10
mov dword [ebp - 0x818], eax
cmp eax, 1
jne 0x4319c3
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
call edx
test al, al
je 0x43189f
xor eax, eax
push 0x3fe
push eax
lea ecx, [ebp - 0x412]
push ecx
mov word [ebp - 0x414], ax
call fcn.0049eae0
add esp, 0xc
lea ecx, [ebx + 0xc16]
lea edx, [ebp - 0x414]
lea ecx, [ecx]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x431860
push edi
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
je 0x4319cf
mov al, 1
test al, al
je 0x4319cf
xor ecx, ecx
push 0x3fe
push ecx
lea edx, [ebp - 0x812]
push edx
mov word [ebp - 0x814], cx
call fcn.0049eae0
xor eax, eax
push 0x3fe
push eax
lea ecx, [ebp - 0x412]
push ecx
mov word [ebp - 0x414], ax
call fcn.0049eae0
lea ecx, [ebx + 0x804]
mov eax, ecx
add esp, 0x18
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4318e3
sub eax, esi
sar eax, 1
je 0x4319cf
mov eax, edi
lea esi, [eax + 2]
lea ecx, [ecx]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x431900
sub eax, esi
sar eax, 1
je 0x4319cf
lea edx, [ebp - 0x814]
jmp 0x431920
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x431920
push edi
lea edx, [ebp - 0x814]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x814]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x4319cf
mov ecx, edi
lea edx, [ebp - 0x414]
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x431960
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x814]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0
lea ecx, [ebp - 0x414]
push ecx
push eax
mov ecx, ebx
call fcn.00430f40
jmp 0x4319cf
test eax, eax
jne 0x4319cf
mov edx, dword [ebp - 0x81c]
add dword [esi], edx
mov eax, dword [ebp - 0x818]
sub eax, 0
je 0x431a09
dec eax
je 0x4319f3
add ebx, 0x1018
push ebx
mov esi, 9
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x431a1e
add ebx, 0x1018
push ebx
mov esi, 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x431a1e
add ebx, 0x1018
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x431a1e
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0049f71b
mov esp, ebp
pop ebp
ret 0xc