Function at 0x478810
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7890
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x434
push ebx
push esi
push edi
mov dword [ebp - 0x30], ecx
call fcn.00478c30
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
je 0x478c13
cmp word [edi], 0x30
je 0x478c13
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x478c13
cmp word [eax], bx
je 0x478c13
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x478c13
mov eax, dword [0x4eee90]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
push ecx
push edi
call fcn.00442eb0
mov esi, eax
add esp, 8
cmp esi, ebx
mov dword [ebp - 0x2c], esi
jne 0x4788cb
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x4ee0f0]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x478925
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x478925
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff4
push eax
call fcn.004d2909
add esp, 4
mov eax, esi
jmp 0x478c15
mov ecx, dword [ebp - 0x10]
mov edi, dword [ecx - 8]
inc edi
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, edi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [ebp - 0x24], ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x10]
test ebx, ebx
jne 0x47892c
mov edx, dword [0x4ee0f0]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x478925
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x478925
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff4
push edx
call fcn.004d2909
add esp, 4
mov eax, esi
jmp 0x478c15
test eax, eax
mov esi, eax
jne 0x478936
xor edi, edi
jmp 0x478968
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [eax + eax + 2]
mov eax, ebx
add eax, 3
and al, 0xfc
call fcn.004d2930
mov edi, esp
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push esi
push 0
push 0
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, dword [ebp - 0x24]
push edi
push ebx
call fcn.0046b6b0
push 1
push 9
push str.BLPLUGIN
push eax
push ebx
push ebx
call fcn.00417be0
lea eax, [ebp - 0x1c]
push ebx
push eax
call fcn.0047ba40
mov ebx, dword [ebp - 0x1c]
add esp, 0x28
test ebx, ebx
je 0x478bd5
mov dx, word [0x50b180]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x236]
mov word [ebp - 0x238], dx
mov word [ebp - 0x440], dx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x43e]
lea edx, [ebp - 0x440]
rep stosd dword es:[edi], eax
lea ecx, [ebp + 8]
mov esi, 0x103
stosw word es:[edi], ax
push ecx
lea eax, [ebp - 0x20]
push edx
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x238]
push eax
push ecx
push edx
push 0
push ebx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], esi
mov dword [ebp + 8], esi
call fcn.0047c120
add esp, 0x1c
test eax, eax
je 0x478bc7
lea eax, [ebp - 0x238]
test eax, eax
je 0x478b6f
cmp word [ebp - 0x238], 0
je 0x478b6f
mov eax, dword [0x4eee90]
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 1
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
lea ecx, [ebp - 0x18]
push ebx
call fcn.00408eb0
test eax, eax
je 0x478a8c
mov edi, dword [ebp - 0x18]
lea eax, [ebx + ebx]
mov ecx, eax
lea esi, [ebp - 0x238]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x18]
mov esi, 0x103
mov dword [ecx - 8], ebx
mov edx, dword [ebp - 0x18]
mov word [eax + edx], 0
lea eax, [ebp - 0x440]
test eax, eax
jne 0x478a9a
xor ebx, ebx
jmp 0x478aa9
lea ecx, [ebp - 0x440]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
mov edi, dword [ebp - 0x14]
cmp dword [edi - 0xc], 1
jg 0x478ab7
cmp ebx, dword [edi - 4]
jle 0x478acf
lea ecx, [ebp - 0x14]
call fcn.00408f50
push ebx
lea ecx, [ebp - 0x14]
call fcn.00408da0
test eax, eax
je 0x478afc
mov edi, dword [ebp - 0x14]
lea eax, [ebx + ebx]
lea esi, [ebp - 0x440]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x14]
mov esi, 0x103
mov dword [ecx - 8], ebx
mov edx, dword [ebp - 0x14]
mov word [eax + edx], 0
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x18]
push edx
push 1
lea ecx, [eax + 4]
mov eax, dword [eax + 0xc]
push eax
call fcn.00479420
mov eax, dword [ebp - 0x14]
mov edx, dword [0x4ee0f0]
mov byte [ebp - 4], 0
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x478b42
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x478b42
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff4
push edx
call fcn.004d2909
add esp, 4
mov eax, dword [ebp - 0x18]
mov edx, dword [0x4ee0f0]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x478b6f
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x478b6f
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff4
push edx
call fcn.004d2909
add esp, 4
mov ecx, 0x82
xor eax, eax
lea edi, [ebp - 0x238]
lea edx, [ebp - 0x440]
rep stosd dword es:[edi], eax
mov ecx, 0x82
lea edi, [ebp - 0x440]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x28]
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 0x20]
push edx
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x238]
inc eax
push edx
mov edx, dword [ebp - 0x1c]
push ecx
push eax
push edx
mov dword [ebp - 0x20], esi
mov dword [ebp + 8], esi
mov dword [ebp - 0x28], eax
call fcn.0047c120
add esp, 0x1c
test eax, eax
jne 0x478a0e
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.0047bf60
add esp, 8
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.004d2909
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x4ee0f0]
add esp, 4
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x478c0e
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x478c0e
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff4
push eax
call fcn.004d2909
add esp, 4
mov eax, dword [ebp - 0x2c]
jmp 0x478c15
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x44c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8