Function at 0x82cb18
Capabilities:
Check mutex on windows
Set current directory

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x4e8
mov esi, dword [esp + 0x4fc]
xor ecx, ecx
mov edx, dword [esp + 0x504]
mov ebp, dword [esp + 0x508]
mov dword [esp + 8], edx
mov dword [0xacbe60], ecx
mov dword [0xacbe84], ecx
mov dword [0xacbe88], ecx
mov ebx, 0xacbe94
mov dword [0xacbe8c], ecx
mov dword [0xacbe90], ecx
xor ecx, ecx
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov dword [ebx + 8], ecx
mov byte [ebx + 0xc], cl
mov ebx, 0xacbea4
xor ecx, ecx
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov byte [ebx + 8], cl
call fcn.008c0bb0
mov ebx, eax
cmp ebx, 0x755
je 0x82d02f
mov ebx, dword [0xae7a24]
cmp ebx, 2
jl 0x82ccaa
mov ecx, dword [0xae7a28]
push dword [ecx + 4]
call fcn.0085a072
mov edi, dword [str.SEGA]
add esp, 4
cmp eax, edi
je 0x82cca3
mov ecx, edi
and ecx, 0xff000000
shr ecx, 0x18
mov edx, edi
and edx, 0xff0000
sar edx, 8
or ecx, edx
mov edx, edi
shl edi, 0x18
and edx, 0xff00
shl edx, 8
or ecx, edx
or ecx, edi
cmp eax, ecx
je 0x82cc92
cmp eax, dword [str.H_NG]
jne 0x82cc8e
cmp ebx, 3
jge 0x82cc1b
mov ecx, 1
mov dword [0xacbec0], ecx
mov dword [0xacbe90], ecx
mov ecx, 1
jmp 0x82ccac
lea ecx, [esp + 0xc]
push 0xc0
push 0
push ecx
call fcn.0086b688
mov ebx, dword [0xae7a28]
lea ecx, [esp + 0x18]
push ecx
push dword [ebx + 8]
call fcn.0088f4f0
add esp, 0x14
test eax, eax
jne 0x82cc8a
lea edi, [esp + 0xc]
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x82cc60
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x82cc54
cmp eax, 4
jb 0x82cc6a
cmp eax, 0xc
jbe 0x82cc6e
xor ecx, ecx
jmp 0x82ccac
lea ebx, [esp + 0xc]
jmp 0x82cc77
add ebx, 1
movsx ecx, byte [ebx]
push ecx
call fcn.00858286
pop ecx
test eax, eax
jne 0x82cc74
jmp 0x82cec7
xor ecx, ecx
jmp 0x82ccac
xor ecx, ecx
jmp 0x82ccac
mov dword [0xacbec0], 1
mov ecx, 1
jmp 0x82ccac
mov ecx, 1
jmp 0x82ccac
xor ecx, ecx
test ecx, ecx
jmp 0x82ccc2
push 0x98a354
xor ecx, ecx
push ecx
push ecx
call dword [sym.imp.kernel32.dll_CreateMutexA]
mov ebx, eax
test ebx, ebx
je 0x82cceb
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0xb7
jmp 0x82ccfd
mov eax, 1
add esp, 0x4e8
pop ebx
pop ebp
pop esi
pop edi
ret 0x10
mov ecx, dword [0xae7a28]
lea edi, [esp + 0xcc]
push 0x400
push dword [ecx]
push edi
call fcn.00858900
add esp, 0xc
lea edi, [esp + 0xcc]
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x82cd37
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x82cd2b
lea edi, [esp + 0xcc]
lea ecx, [esp + eax + 0xcb]
cmp ecx, edi
je 0x82cd5f
movsx edi, byte [ecx]
cmp edi, 0x5c
je 0x82cd5f
lea edi, [esp + 0xcc]
add ecx, 0xffffffff
cmp ecx, edi
jne 0x82cd49
mov byte [ecx], 0
lea ecx, [esp + 0xcc]
push ecx
call fcn.0085afdb
pop ecx
lea ecx, [esp + 0xcc]
push ecx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
lea ecx, [esp + 0xcc]
push 0x400
push ecx
push 0xacba40
call fcn.00858900
add esp, 0xc
mov dword [0xacbed8], 0
mov dword [0xacbedc], esi
push 0x66
push esi
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0xacbed4], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0xacbed0], eax
push 0x7f84
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0xacbecc], eax
push 0x7f85
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov ecx, dword [esp + 8]
mov dword [0xacbe68], 0xffffffff
xor edi, edi
mov dword [0xacbec8], eax
mov dword [0xacbe70], 0x98a374
mov dword [0xacbe64], ecx
mov ecx, dword [0xacbe90]
mov dword [0xacbe6c], ebp
test ecx, ecx
mov dword [0xacbe74], edi
mov dword [0xacbe7c], 0x280
mov dword [0xacbe78], edi
mov dword [0xacbe80], 0x1e0
je 0x82ce49
push str.PSOBB_Hangame
call fcn.007a6080
pop ecx
jmp 0x82ce51
push 0
call fcn.007a6080
pop ecx
mov ecx, dword [0xacbe78]
test ecx, ecx
je 0x82ce65
mov dword [0xacbef0], 1
mov dword [0xacbe60], 1
mov eax, esi
mov edx, ebp
call fcn.0082d050
mov edx, dword [0xacbed8]
test edx, edx
je 0x82cea6
push edx
call fcn.008c0bd0
pop ecx
mov edx, dword [0xacbe60]
test edx, edx
jne 0x82cf6d
call fcn.0082d384
call fcn.007a5e84
call fcn.0082d20c
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [0xacbebc]
test eax, eax
je 0x82ceb8
call eax
xor eax, eax
add esp, 0x4e8
pop ebx
pop ebp
pop esi
pop edi
ret 0x10
push 4
push 0x98a350
push ebx
call fcn.008598c0
add esp, 0xc
test eax, eax
jne 0x82cf1f
lea edi, [esp + 0x4c]
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x82cef5
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x82cee9
cmp eax, 1
jb 0x82ceff
cmp eax, 8
jbe 0x82cf06
xor ecx, ecx
jmp 0x82ccac
lea ebx, [esp + 0x4c]
jmp 0x82cf0f
add ebx, 1
movsx ecx, byte [ebx]
push ecx
call fcn.00858286
pop ecx
test eax, eax
jne 0x82cf0c
jmp 0x82cf26
xor ecx, ecx
jmp 0x82ccac
movsx ecx, byte [ebx]
test ecx, ecx
jne 0x82cf66
mov dword [0xacbe90], 1
lea ecx, [esp + 0xc]
push 0xc
push ecx
push 0xacbe94
call fcn.00858900
lea ecx, [esp + 0x58]
push 8
push ecx
push 0xacbea4
call fcn.00858900
add esp, 0x18
mov ecx, 1
jmp 0x82ccac
xor ecx, ecx
jmp 0x82ccac
mov dword [0xacbe8c], 1
call fcn.008418c8
lea ecx, [esp + 0x4cc]
push 1
xor edx, edx
push edx
push edx
push edx
push ecx
call dword [sym.imp.user32.dll_PeekMessageA]
test eax, eax
je 0x82cfd6
mov edx, dword [esp + 0x4d0]
cmp edx, 0x12
je 0x82cfef
lea edx, [esp + 0x4cc]
push edx
call dword [sym.imp.user32.dll_TranslateMessage]
lea edx, [esp + 0x4cc]
push edx
call dword [sym.imp.user32.dll_DispatchMessageA]
lea ecx, [esp + 0x4cc]
push 1
xor edx, edx
push edx
push edx
push edx
push ecx
call dword [sym.imp.user32.dll_PeekMessageA]
test eax, eax
jne 0x82cf95
call fcn.008412dc
push 1
call dword [sym.imp.kernel32.dll_Sleep]
mov edx, dword [0xacbe8c]
test edx, edx
jne 0x82cf7c
jmp 0x82cffc
mov edx, dword [esp + 0x4d4]
mov dword [0xacbe68], edx
mov edx, dword [0xacbe84]
test edx, edx
je 0x82d025
push 0xffffffffffffffff
push edx
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
push dword [0xacbe84]
call dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [0xacbe84], 0
call fcn.0083fea8
jmp 0x82cea6
call fcn.00845060
push 1
push ebx
mov ecx, eax
call fcn.00844ff4
mov eax, 1
add esp, 0x4e8
pop ebx
pop ebp
pop esi
pop edi
ret 0x10