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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44aac0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x45d274]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x45d020]
mov edx, dword [eax + 0xc]
mov ecx, 0x45d020
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov ebx, 1
mov dword [ebp - 4], 0
mov eax, dword [esi - 8]
mov ecx, ebx
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x41c89a
push 0x104
lea ecx, [ebp - 0x14]
call fcn.004035c0
mov esi, dword [ebp - 0x14]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042f686
add esp, 8
test eax, eax
js 0x41caf9
cmp eax, dword [esi - 8]
jg 0x41caf9
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [esi - 0xc], ecx
je 0x41cb03
mov ecx, dword [esi - 0xc]
cmp ecx, 0xe6
jg 0x41cb03
lea eax, [ecx - 1]
test eax, eax
js 0x41caf9
cmp eax, ecx
jg 0x41caf9
cmp word [esi + eax*2], 0x5c
je 0x41c90c
push 0x5c
lea edi, [ebp - 0x14]
call fcn.0041cd40
mov esi, dword [ebp - 0x14]
mov edx, dword [0x45d020]
mov eax, dword [edx + 0xc]
mov ecx, 0x45d020
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.00402c30
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 4], 2
call fcn.0041c770
add esp, 8
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c969
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
cmp dword [eax - 4], ebx
jle 0x41c980
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x10]
call fcn.004034e0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0042f686
add esp, 8
test eax, eax
js 0x41caf9
mov ecx, dword [ebp - 0x10]
cmp eax, dword [ecx - 8]
jg 0x41caf9
mov dword [ecx - 0xc], eax
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], edx
jne 0x41c9db
push 0x45355c
lea ecx, [ebp - 0x18]
call fcn.00403420
push str.EbonBrowser
lea ecx, [ebp - 0x10]
call fcn.00403420
jmp 0x41ca39
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
lea ecx, [ebp - 0x18]
call fcn.00403420
mov eax, dword [ebp - 0x10]
cmp dword [eax - 4], ebx
jle 0x41ca02
mov edx, dword [eax - 0xc]
push edx
lea ecx, [ebp - 0x10]
call fcn.004034e0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0042f686
add esp, 8
test eax, eax
js 0x41caf9
mov ecx, dword [ebp - 0x10]
cmp eax, dword [ecx - 8]
jg 0x41caf9
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x10]
xor ecx, ecx
mov word [edx + eax*2], cx
mov ebx, dword [ebp - 0x18]
xor edi, edi
mov edi, edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
push edi
push eax
push esi
push str._s_s_i_s
push ecx
call fcn.004032e0
inc edi
add esp, 0x18
cmp edi, 0x3e8
jge 0x41ca72
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41ca40
xor eax, eax
cmp edi, 0x3e8
setne al
mov byte [ebp - 4], 1
or edx, 0xffffffff
mov edi, eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41caa2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41cac2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41cae5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00403700
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41cb26
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret