Function at 0x401880
Capabilities:
Check mutex on windows
Get common file path
Set current directory

Disassembly:
sub esp, 0x244
push ebx
push ebp
push str.BlueBirdEndBBUpgrad
xor ebx, ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
cmp eax, 0xb7
je 0x401a87
push esi
push edi
lea ecx, [esp + 0x24]
call fcn.004023d0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x151]
mov byte [esp + 0x150], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x4c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
or ecx, 0xffffffff
mov edi, str.BService
xor eax, eax
lea edx, [esp + 0x4c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x50]
and ecx, 3
push 0x410d5c
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40e060
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x54]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x410d5c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00404bd7
add esp, 8
pop edi
pop esi
cmp eax, ebx
jne 0x4019a9
lea ecx, [esp + 0x1c]
call fcn.00402510
pop ebp
mov eax, 1
pop ebx
add esp, 0x244
ret 0x10
lea ecx, [esp + 0x148]
push 0x104
push ecx
mov byte [eax + 1], bl
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x401a34
call ebp
mov dl, byte [esp + 0xb]
push eax
lea eax, [esp + 0x10]
push str.Error_is__d_on_Getting_window_directory_n
push eax
mov byte [esp + 0x18], dl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call fcn.00402260
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp eax, ebx
jne 0x4019f9
mov eax, 0x40c12c
push eax
call fcn.00401850
mov ecx, dword [esp + 0x14]
add esp, 4
cmp ecx, ebx
je 0x401a26
mov al, byte [ecx - 1]
cmp al, bl
je 0x401a1c
cmp al, 0xff
je 0x401a1c
dec al
mov byte [ecx - 1], al
jmp 0x401a26
dec ecx
push ecx
call fcn.00403cc0
add esp, 4
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
jmp 0x401a7e
mov eax, dword [0x410d58]
push str.BBupgrad.exe
cmp eax, 0x80000000
lea ecx, [esp + 0x20]
jae 0x401a69
call fcn.00402c90
push str.BBupgrad
push str.BBupgrad.exe
call fcn.00401f60
add esp, 8
lea ecx, [esp + 0x1c]
push str.BBupgrad.exe
call fcn.00402c90
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00401aa0
lea ecx, [esp + 0x1c]
call fcn.00402510
pop ebp
xor eax, eax
pop ebx
add esp, 0x244
ret 0x10