Function at 0x4200c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x214
mov eax, dword [esp + 0x220]
mov ecx, dword [esp + 0x224]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x224]
push edi
xor edi, edi
mov dword [eax], edi
mov byte [esp + 0x12], 0
test esi, esi
mov byte [esp + 0x13], 1
mov byte [esp + 0x11], 0
mov dword [esp + 0x18], edi
mov dword [ecx], edi
jne 0x42010b
mov eax, dword [esp + 0x22c]
test eax, eax
je 0x4202d1
test esi, esi
mov dword [esp + 0x14], 0
jne 0x4202de
mov edx, dword [esp + 0x22c]
push edx
call dword [sym.imp.SHLWAPI.dll_StrDupW]
mov esi, eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x22c], esi
cmp word [esi], 0x22
mov edi, esi
jne 0x420167
mov ax, word [esi + 2]
add esi, 2
test ax, ax
mov byte [esp + 0x13], 0
mov ecx, esi
je 0x420194
cmp ax, 0x22
je 0x420192
mov ax, word [esi + 2]
add esi, 2
test ax, ax
mov edi, esi
jne 0x420151
jmp 0x420194
mov ax, word [esi]
mov ecx, dword [esp + 0x22c]
test ax, ax
je 0x420194
cmp ax, 0x20
je 0x420192
cmp ax, 9
je 0x420192
mov ax, word [esi + 2]
add esi, 2
test ax, ax
mov edi, esi
jne 0x420176
jmp 0x420194
mov edi, esi
mov bx, word [edi]
lea eax, [esp + 0x1c]
push 0
push eax
push 0x104
push 0x42e230
push ecx
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_SearchPathW]
mov ebp, eax
shl ebp, 1
je 0x4202a6
cmp ebp, 0x208
jae 0x4201e3
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4201e0
test al, 0x10
jne 0x4202a6
add ebp, 2
test ebp, ebp
je 0x4202a6
cmp ebp, 0x208
jae 0x4202a6
mov al, byte [esp + 0x11]
lea edx, [esp + 0x1c]
test al, al
mov word [edi], bx
mov dword [esp + 0x228], edx
jne 0x420219
mov al, byte [esp + 0x12]
test al, al
je 0x420336
mov esi, dword [esp + 0x228]
mov ecx, dword [esp + 0x22c]
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea edx, [eax + eax + 6]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x18], ebp
je 0x42031a
push 0x42e22c
push ebp
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov al, byte [esp + 0x19]
add esp, 8
test al, al
je 0x42026b
mov bx, word [edi]
mov word [edi], 0
mov eax, dword [esp + 0x22c]
mov esi, dword [sym.imp.MSVCRT.dll_wcscat]
push eax
push ebp
call esi
push 0x42e22c
push ebp
call esi
mov al, byte [esp + 0x21]
add esp, 0x10
test al, al
je 0x420336
mov ecx, dword [esp + 0x18]
push edi
push ecx
mov word [edi], bx
call esi
add esp, 8
jmp 0x420336
mov word [edi], bx
cmp word [esi], 0
je 0x4202c6
mov al, byte [esp + 0x13]
test al, al
je 0x4202c6
add esi, 2
mov byte [esp + 0x11], 1
mov edi, esi
jmp 0x420167
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x214
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4202d1
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4202d1
mov eax, dword [esp + 0x22c]
test eax, eax
je 0x420305
cmp word [eax], 0
jne 0x42033d
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x12], 1
mov dword [esp + 0x22c], esi
jmp 0x420220
mov al, byte [esp + 0x11]
test al, al
je 0x420327
mov byte [esp + 0x11], 0
mov al, byte [esp + 0x12]
test al, al
je 0x42033d
mov byte [esp + 0x12], 0
jmp 0x42033d
mov esi, dword [esp + 0x228]
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrDupW]
call esi
mov edx, dword [esp + 0x230]
mov dword [edx], eax
mov al, byte [esp + 0x11]
test al, al
jne 0x42036c
mov al, byte [esp + 0x12]
test al, al
jne 0x42036c
mov eax, dword [esp + 0x22c]
mov edi, dword [esp + 0x18]
jmp 0x420372
mov edi, dword [esp + 0x18]
mov eax, edi
push eax
call esi
mov ecx, dword [esp + 0x234]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ecx], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x42038f
push eax
call esi
test edi, edi
je 0x420396
push edi
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x214
ret