Function at 0x478230
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d53c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x42c
push ebx
push esi
push edi
mov dword [ebp - 0x28], ecx
call fcn.004785c0
mov esi, dword [ebp + 8]
xor edi, edi
cmp esi, edi
je 0x47859f
cmp word [esi], 0x30
je 0x47859f
mov eax, dword [ebp + 0xc]
cmp eax, edi
je 0x47859f
cmp word [eax], di
je 0x47859f
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x47859f
mov eax, dword [0x4e8e98]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], edi
push ecx
push esi
call fcn.00442cd0
mov ebx, eax
add esp, 8
cmp ebx, edi
mov dword [ebp - 0x24], ebx
jne 0x4782eb
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x4e80f0]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x478343
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x478343
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff4
push eax
call fcn.004d0379
add esp, 4
mov eax, ebx
jmp 0x4785a1
mov ecx, dword [ebp - 0x10]
mov esi, dword [ecx - 8]
inc esi
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, eax
mov ecx, esi
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
add esp, 4
and ecx, 3
mov dword [ebp + 8], edx
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x10]
test edx, edx
jne 0x47834a
mov ecx, dword [0x4e80f0]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x478343
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x478343
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff4
push eax
call fcn.004d0379
add esp, 4
mov eax, ebx
jmp 0x4785a1
test eax, eax
mov ebx, eax
jne 0x478354
xor esi, esi
jmp 0x478386
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.004d03a0
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp + 8]
push esi
push edx
call fcn.0046b110
mov ebx, dword [ebp + 8]
push 1
push 9
push str.BLPLUGIN
push eax
push ebx
push ebx
call fcn.00417bc0
lea ecx, [ebp - 0x14]
push ebx
push ecx
call fcn.0047a920
mov esi, dword [ebp - 0x14]
add esp, 0x28
test esi, esi
je 0x478564
mov dx, word [0x505000]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x22e]
mov word [ebp - 0x230], dx
mov word [ebp - 0x438], dx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x436]
lea edx, [ebp - 0x18]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, 0x103
push edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x438]
lea ecx, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x230]
push ecx
push edx
push eax
push 0
push esi
mov dword [ebp - 0x20], 0
call fcn.0047b000
add esp, 0x1c
test eax, eax
je 0x478556
lea ecx, [ebp - 0x230]
test ecx, ecx
je 0x4784f9
cmp word [ebp - 0x230], 0
je 0x4784f9
mov edx, dword [0x4e8e98]
lea eax, [ebp - 0x230]
push eax
mov dword [ebp - 0x24], 1
mov dword [ebp + 8], edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x4784af
lea ecx, [esi + esi + 0xe]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x4784af
lea ecx, [esi + esi]
mov dword [eax], 1
mov word [eax + esi*2 + 0xc], 0
mov edx, ecx
mov dword [eax + 4], esi
mov dword [eax + 8], esi
lea edi, [eax + 0xc]
lea esi, [ebp - 0x230]
shr ecx, 2
mov dword [ebp + 8], edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x28]
lea edx, [ebp + 8]
push edx
push 1
lea ecx, [eax + 4]
mov byte [ebp - 4], 1
mov eax, dword [ecx + 8]
push eax
call fcn.004082a0
mov eax, dword [ebp + 8]
mov edx, dword [0x4e80f0]
mov byte [ebp - 4], 0
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4784f9
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4784f9
mov edx, dword [ebp + 8]
add edx, 0xfffffff4
push edx
call fcn.004d0379
add esp, 4
mov ecx, 0x82
xor eax, eax
lea edi, [ebp - 0x230]
lea edx, [ebp - 0x438]
rep stosd dword es:[edi], eax
mov ecx, 0x82
lea edi, [ebp - 0x438]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x18]
mov eax, 0x103
push ecx
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
push edx
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x230]
inc eax
push edx
mov edx, dword [ebp - 0x14]
push ecx
push eax
push edx
mov dword [ebp - 0x20], eax
call fcn.0047b000
add esp, 0x1c
test eax, eax
jne 0x47842f
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.0047ae40
add esp, 8
push ebx
call fcn.004d0379
mov eax, dword [ebp - 0x10]
mov edx, dword [0x4e80f0]
add esp, 4
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47859a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x47859a
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff4
push edx
call fcn.004d0379
add esp, 4
mov eax, dword [ebp - 0x24]
jmp 0x4785a1
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x444]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc