Function at 0x4015a0
Capabilities:
Check mutex on windows
Get session user name
Print debug messages
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x451d92
mov eax, dword fs:[0]
push eax
sub esp, 0x290
mov eax, dword [0x460164]
xor eax, esp
mov dword [esp + 0x288], eax
push ebx
push esi
push edi
mov eax, dword [0x460164]
xor eax, esp
push eax
lea eax, [esp + 0x2a0]
mov dword fs:[0], eax
call fcn.00401510
test eax, eax
je 0x4015f9
push str.Dont_support_Guest_user_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x40189f
xor esi, esi
push 0x200
lea eax, [esp + 0x92]
push esi
push eax
mov word [esp + 0x98], si
call fcn.00439d50
add esp, 0xc
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x90]
push edx
mov dword [esp + 0x38], 0x101
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea eax, [esp + 0x1c]
push eax
mov ecx, str.BCU_EXE_RUN_ONCE_
call fcn.00401a60
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x2c]
push edx
lea ebx, [esp + 0x94]
mov dword [esp + 0x2b0], esi
call fcn.00401b30
mov eax, dword [eax]
add esp, 8
push eax
xor edi, edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, eax
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov dword [esp + 0x34], esi
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401696
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, 0xffffffff
je 0x401874
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x401874
call fcn.004011b0
lea ecx, [esp + 0x10]
push ecx
mov ecx, str.EnableDynamicGameIcon
mov dword [esp + 0x24], edi
call fcn.00401a60
lea edx, [esp + 0x14]
push edx
mov ecx, str.SoftwareDeviceVMBrowser_Configuration_Utility
mov byte [esp + 0x2ac], 1
call fcn.00401a60
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
push ecx
lea eax, [esp + 0x1c]
mov edx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.00426850
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
add esp, 8
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40171a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2a8], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401742
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x64]
push ecx
call fcn.004258e0
mov byte [esp + 0x2a8], 2
cmp dword [esp + 0x20], edi
je 0x401807
push 0xc
call fcn.00435196
add esp, 4
cmp eax, edi
je 0x40177e
mov dword [eax + 4], edi
mov dword [eax], vtable.RegionChangeEventSink.0
mov dword [eax + 8], edi
mov dword [esp + 0x18], eax
jmp 0x401782
mov dword [esp + 0x18], edi
lea edx, [esp + 0x64]
push edx
call fcn.00425aa0
cmp eax, edi
je 0x401807
lea esi, [esp + 0x14]
call fcn.00401a40
mov eax, esi
push eax
mov byte [esp + 0x2ac], 3
call fcn.00427670
add esp, 4
lea esi, [esp + 0x10]
mov ebx, eax
call fcn.00401a40
mov byte [esp + 0x2a8], 4
mov ecx, dword [esp + 0x14]
push ecx
push str.SELECT__FROM_RegistryValueChangeEvent_WHERE_Hive__HKEY_USERS_AND_KeyPath___sControl_PanelInternational_AND_ValueName__sCountry
mov edi, esi
call fcn.00402050
add esp, 8
test ebx, ebx
je 0x4017eb
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
push edx
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.00425b10
lea ecx, [esp + 0x10]
call fcn.00401b10
lea ecx, [esp + 0x14]
mov byte [esp + 0x2a8], 2
call fcn.00401b10
xor edi, edi
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0x4013a0
push 0xbb8
push edi
push edi
call esi
push 0x4013b0
push 0x7530
push edi
push edi
mov dword [esp + 0x28], eax
call esi
lea esi, [esp + 0x58]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], edi
call fcn.004013e0
test eax, eax
je 0x401848
mov edx, esi
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x14]
push str.GlobalBCUClient
push edi
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, edi
mov dword [esp + 0x24], eax
jne 0x4018c7
lea ecx, [esp + 0x64]
mov byte [esp + 0x2a8], 0
call fcn.00425960
mov dword [esp + 0x2a8], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40189f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x2a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x288]
xor ecx, esp
call fcn.00435245
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [sym.imp.USER32.dll_PeekMessageW]
mov dword [esp + 0x10], edi
jmp 0x4018d5
xor edi, edi
push 0x4bf
push 0x3e8
push edi
lea ecx, [esp + 0x30]
push ecx
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
mov edx, dword [0x461acc]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x461acc
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x38], edi
cmp esi, 0x80
mov byte [esp + 0x2a8], 5
ja 0x401973
je 0x401964
sub esi, 0
je 0x401964
sub esi, 1
jne 0x401980
push 1
push esi
push esi
push esi
lea ecx, [esp + 0x4c]
push ecx
call ebx
test eax, eax
je 0x401980
cmp dword [esp + 0x40], 0x12
je 0x401978
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push 0
push 0
push 0
lea ecx, [esp + 0x4c]
push ecx
call ebx
test eax, eax
jne 0x401932
jmp 0x401980
mov dword [esp + 0x10], 1
call fcn.00405b90
jmp 0x401980
cmp esi, 0xffffffff
jne 0x401980
mov dword [esp + 0x10], 1
lea eax, [edi - 0x10]
mov byte [esp + 0x2a8], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4019a4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x10], 0
je 0x4018d3
mov ecx, dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4019ce
mov edx, dword [eax + 4]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.USER32.dll_KillTimer]
push eax
push 0
call esi
mov ecx, dword [esp + 0x2c]
push ecx
push 0
call esi
mov edx, dword [esp + 0x34]
push edx
call edi
mov esi, dword [esp + 0x44]
lea ecx, [esp + 0x64]
mov byte [esp + 0x2a8], 0
call fcn.00425960
mov dword [esp + 0x2a8], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401a2d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
jmp 0x4018a1