Function at 0x401f00
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x460ff0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, dword [0x46f42c]
push esi
mov esi, dword [esp + 0x1c]
push edi
test esi, esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
je 0x401f84
mov ecx, esi
shr ecx, 0x10
jne 0x401f4c
and esi, 0xffff
lea ecx, [esp + 8]
push esi
call fcn.00407c70
jmp 0x401f84
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x401f84
push edi
lea ecx, [esp + 0xc]
call fcn.00408040
test eax, eax
je 0x401f84
lea ecx, [edi + edi]
lea edx, [edi + edi + 2]
cmp edx, ecx
jb 0x401f84
mov edi, dword [esp + 8]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 8]
push str..ico
push ecx
mov dword [esp + 0x20], 0
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40200e
mov edx, dword [esp + 8]
push 0x10
push 0x10
push 0x10
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
test eax, eax
mov dword [esp + 0xc], eax
je 0x40200e
mov edx, dword [0x46f430]
mov esi, eax
mov eax, dword [esp + 8]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x401ffb
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x401ffb
mov edx, dword [esp + 8]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
xor edi, edi
push ebx
push edi
push 0x2c
lea ecx, [esp + 0x14]
call fcn.004076b0
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov esi, eax
test esi, esi
jle 0x402108
lea eax, [esi + 1]
lea ecx, [esp + 0x24]
push eax
push ecx
lea ecx, [esp + 0x14]
call fcn.00407680
mov eax, dword [eax]
push eax
call fcn.0045514d
mov ecx, dword [0x46f430]
mov edi, eax
mov eax, dword [esp + 0x28]
add esp, 4
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x402077
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x402077
mov eax, dword [esp + 0x24]
add eax, 0xfffffff4
push eax
call fcn.004535f0
add esp, 4
push esi
lea ecx, [esp + 0x28]
push 0xffffffffffffffff
push ecx
lea ecx, [esp + 0x18]
call fcn.00407500
mov esi, eax
mov eax, dword [esi]
mov ecx, dword [esp + 0xc]
cmp ecx, eax
mov byte [esp + 0x1c], 1
je 0x4020dd
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x4020ad
mov edx, dword [0x46f430]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x4020b4
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x4020c4
mov edx, dword [eax - 8]
push eax
push edx
lea ecx, [esp + 0x14]
call fcn.004080a0
jmp 0x4020dd
lea ecx, [esp + 0xc]
call fcn.004083e0
mov esi, dword [esi]
mov dword [esp + 0xc], esi
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x24]
mov edx, dword [0x46f430]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x402108
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x402108
mov edx, dword [esp + 0x24]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40212c
mov edx, dword [esp + 0xc]
push 1
lea ecx, [esp + 0x14]
push 0
push ecx
push edi
push edx
call dword [sym.imp.SHELL32.dll_ExtractIconExW]
mov eax, dword [esp + 0xc]
mov edx, dword [0x46f430]
mov esi, dword [esp + 0x10]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40215b
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x40215b
mov edx, dword [esp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.004535f0
add esp, 4
mov ecx, dword [esp + 0x14]
pop ebx
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret