Function at 0x4058d0
Capabilities:
Check mutex on windows
Create directory
Create thread
Get common file path
Print debug messages

Disassembly:
sub esp, 0x120
push ebx
push esi
push edi
push str.1
call fcn.00402960
add esp, 4
push str.T611519B_E439_4444_AAA2_60AAAAFF2EF
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x405910
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x120
ret 0x10
mov esi, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, 0x41
xor eax, eax
mov edi, 0x4321d4
push 0x104
push 0x432384
rep stosd dword es:[edi], eax
call esi
push 0x104
push 0x4321d4
call esi
mov edi, str.kz.21ec2020_3aea_1069_a2dd_08002b30309d
or ecx, 0xffffffff
xor eax, eax
push 0x4321d4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x4321d4
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]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
jne 0x405984
push eax
push 0x4321d4
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str.2
call fcn.00402960
mov edi, 0x4321d4
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x28]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.jjmclient.ini
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x28]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edi, str.CheckMac
or ecx, 0xffffffff
xor eax, eax
push 0x432384
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x432384
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]
call fcn.00402960
mov esi, dword [esp + 0x134]
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
add esp, 4
push 0x64
push 0x4324f4
push 0x67
push esi
call edi
push 0x64
push 0x432490
push 0x6d
push esi
call edi
push esi
call fcn.00405b10
mov eax, dword [esp + 0x140]
push eax
push esi
call fcn.00405ba0
add esp, 0xc
test eax, eax
jne 0x405a85
push 0x42bdcc
call fcn.00402960
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x120
ret 0x10
push 0x6d
push esi
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
push 0
push 0
push 0
push 0x405de0
push 0
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
lea ecx, [esp + 0x14]
push 0
push ecx
call edi
test eax, eax
je 0x405afe
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
push ebp
mov ebp, dword [sym.imp.USER32.dll_TranslateMessage]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x10]
push edx
push esi
push eax
call ebx
test eax, eax
jne 0x405aec
lea ecx, [esp + 0x10]
push ecx
call ebp
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
lea eax, [esp + 0x18]
push 0
push eax
call edi
test eax, eax
jne 0x405ac9
pop ebp
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
add esp, 0x120
ret 0x10