Function at 0x412370
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47cba1
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x4be5b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 8]
xor esi, esi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x244], edx
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x230], eax
test edx, edx
je 0x4123c4
mov dword [edx], esi
test ecx, ecx
je 0x4123ca
mov dword [ecx], esi
test eax, eax
je 0x4123d0
mov dword [eax], esi
test ebx, ebx
je 0x4123d6
mov dword [ebx], esi
push 0x210
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.00432c40
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x107
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.MsHtml.dll
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4125f3
call fcn.0040b4c0
mov ecx, eax
test ecx, ecx
je 0x412613
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x22c], eax
mov dword [ebp - 4], 0
call fcn.0040b4c0
mov ecx, eax
test ecx, ecx
je 0x41261d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x220]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x228]
call fcn.00406bc0
test al, al
jne 0x4124b2
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412490
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x228]
call fcn.00416a50
lea eax, [ebp - 0x22c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.0040a1b0
mov edx, dword [ebp - 0x228]
add esp, 8
test eax, eax
mov byte [ebp - 4], 0
sete byte [ebp - 0x221]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4124f9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x221], 0
je 0x41252d
mov edx, dword [ebp - 0x22c]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x4125f3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4125f3
mov esi, dword [ebp - 0x22c]
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x234], 0
push eax
lea eax, [ebp - 0x238]
mov dword [ebp - 0x238], 0
push eax
lea eax, [ebp - 0x234]
mov dword [ebp - 0x23c], 0
push eax
push str._u._u._u._u
push esi
mov dword [ebp - 0x240], 0
call fcn.0041a480
mov ecx, dword [ebp - 0x244]
add esp, 0x18
test ecx, ecx
je 0x412597
mov eax, dword [ebp - 0x234]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x248]
test ecx, ecx
je 0x4125a9
mov eax, dword [ebp - 0x238]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x230]
test ecx, ecx
je 0x4125bb
mov eax, dword [ebp - 0x23c]
mov dword [ecx], eax
test ebx, ebx
je 0x4125c7
mov eax, dword [ebp - 0x240]
mov dword [ebx], eax
mov dword [ebp - 0x230], 1
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x4125ed
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov esi, dword [ebp - 0x230]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042c75e
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.004068b0
push 0x80004005
call fcn.004068b0
int3