Function at 0x6588ce0a
Capabilities:
Accept command line arguments
Check mutex on windows
Create directory
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1bc
mov dword [ebp - 0xe4], 0x658db3c0
mov dword [ebp - 0xe0], 0x6592f106
lea eax, [ebp - 0xdc]
lea edx, [ebp - 0x18]
mov dword [eax], edx
mov edx, 0x6588dc06
mov dword [eax + 4], edx
mov dword [eax + 8], esp
lea eax, [ebp - 0xfc]
mov dword [esp], eax
call fcn.658e7610
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x100], ecx
mov dword [ebp - 0xf8], 0xffffffff
call sub.KERNEL32.dll_GetCurrentProcess
mov edx, dword [ebp - 0x100]
mov dword [edx + 0x2a0], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x104], ecx
call sub.KERNEL32.dll_GetCurrentProcessId
mov edx, dword [ebp - 0x104]
mov dword [edx + 0x2a4], eax
mov dword [ebp - 0x1c], str.12017580013707233233987537782574702577133548287527131234152948150506251412291888866940292054989907714155267326586216043845592229084368540020196135619327879
mov dword [ebp - 0x20], str.11898921368616868351880508246112101394478760265769325412746398405473436969889506919017477758618276066588858607419440134394668095105156501566867770737187273
mov dword [ebp - 0x24], str.76986729922013555803005346411676553796216642757744136918874786680847350484561355561990197463851432043966925732503405503392169872913316040431385473364992747280187301473917937217770571147715209164630731036001536097640055859779719441340893852413578783372753311287389876226475916787249536441608198161537606056385
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [0x6593a308]
mov dword [esp], eax
call fcn.658b4a78
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x108], ecx
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x58]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Tibiantis.dll
lea eax, [ebp - 0x48]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x18
call fcn.65912068
lea eax, [ebp - 0x48]
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 0x78]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x78]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x659344eb
lea eax, [ebp - 0x68]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x17
call fcn.65912068
lea eax, [ebp - 0x68]
mov edx, dword [ebp - 0x10c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x108]
mov dword [esp], ecx
mov dword [ebp - 0xf8], 0x16
call fcn.6592dd90
sub esp, 4
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x15
call fcn.658b4192
mov dword [ebp - 0x110], eax
jmp 0x6588cfa4
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x16
call fcn.65912888
jmp 0x6588cfea
lea eax, [ebp - 0x68]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x17
call fcn.65912888
jmp 0x6588d026
lea eax, [ebp - 0x78]
mov dword [esp], eax
call fcn.65908a54
jmp 0x6588d062
lea eax, [ebp - 0x48]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x18
call fcn.65912888
jmp 0x6588d0b4
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.65908a54
cmp dword [ebp - 0x110], 0
jne 0x6588d1c2
lea eax, [ebp - 0x98]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x98]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Tibiantis_client_was_unable_to_load_Tibiantis.dll_properly_
lea eax, [ebp - 0x88]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x14
call fcn.65912068
lea eax, [ebp - 0x88]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x88
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x13
call fcn.65912a28
jmp 0x6588d15c
lea eax, [ebp - 0x88]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x14
call fcn.65912888
jmp 0x6588d1b4
lea eax, [ebp - 0x98]
mov dword [esp], eax
call fcn.65908a54
mov eax, dword [ebp + 8]
add eax, 0xc0
mov dword [esp + 4], eax
mov dword [esp], 0x101
mov dword [ebp - 0xf8], 0xffffffff
call sub.WS2_32.DLL_WSAStartup
sub esp, 8
test eax, eax
je 0x6588d2e5
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x88]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Tibiantis_client_was_unable_to_initialize_winsock_
lea eax, [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x12
call fcn.65912068
lea eax, [ebp - 0x98]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x88
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x11
call fcn.65912a28
jmp 0x6588d27f
lea eax, [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x12
call fcn.65912888
jmp 0x6588d2d7
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.65908a54
mov dword [ebp - 0xf8], 0xffffffff
call sub.KERNEL32.dll_GetCommandLineW
mov edx, eax
lea eax, [ebp - 0x9c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.SHELL32.DLL_CommandLineToArgvW
sub esp, 8
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x9c]
shl eax, 2
mov dword [esp], eax
call fcn.658dfba0
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa8], 0
mov eax, dword [ebp - 0xa8]
cmp eax, dword [ebp - 0x9c]
jge 0x6588d41d
mov eax, dword [ebp - 0xa8]
lea edx, [eax*4]
mov eax, dword [ebp - 0xa0]
mov eax, dword [edx + eax]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
mov dword [ebp - 0xac], eax
mov eax, dword [ebp - 0xa8]
shl eax, 2
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0xac]
inc eax
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xffffffff
call fcn.658dfba0
mov edx, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x140]
mov dword [edx + ecx], eax
mov dword [ebp - 0xb0], 0
mov eax, dword [ebp - 0xb0]
cmp eax, dword [ebp - 0xac]
jg 0x6588d410
mov eax, dword [ebp - 0xa8]
lea edx, [eax*4]
mov eax, dword [ebp - 0xa4]
mov eax, dword [edx + eax]
mov esi, dword [ebp - 0xb0]
add esi, eax
mov eax, dword [ebp - 0xa8]
lea ecx, [eax*4]
mov ebx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0xb0]
lea edx, [eax + eax]
mov eax, dword [ecx + ebx]
movzx eax, word [edx + eax]
mov byte [esi], al
lea eax, [ebp - 0xb0]
inc dword [eax]
jmp 0x6588d3b5
lea eax, [ebp - 0xa8]
inc dword [eax]
jmp 0x6588d332
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xffffffff
call sub.KERNEL32.dll_LocalFree
sub esp, 4
cmp dword [ebp - 0x9c], 1
jle 0x6588d46a
mov eax, dword [ebp - 0xa4]
add eax, 4
mov dword [esp + 4], 0x65934563
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x6588d46a
mov eax, dword [ebp + 8]
mov byte [eax + 0x25c], 1
mov eax, dword [ebp + 8]
cmp byte [eax + 0x25c], 0
je 0x6588d4a1
mov dword [esp + 8], str._TibiantisCam
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0xf8], 0xffffffff
call sub.KERNEL32.dll_CreateMutexA
sub esp, 0xc
jmp 0x6588d4ca
mov dword [esp + 8], str._Tibiantis
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0xf8], 0xffffffff
call sub.KERNEL32.dll_CreateMutexA
sub esp, 0xc
mov dword [ebp - 0xf8], 0xffffffff
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb7
jne 0x6588d6e5
mov eax, dword [ebp + 8]
cmp byte [eax + 0x25c], 0
jne 0x6588d5ef
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x88]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Tibiantis_client_is_already_running_
lea eax, [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x10
call fcn.65912068
lea eax, [ebp - 0x98]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x88
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xf
call fcn.65912a28
jmp 0x6588d584
lea eax, [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0x10
call fcn.65912888
jmp 0x6588d5dc
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.65908a54
jmp 0x6588d6e5
lea eax, [ebp - 0x98]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x98]
mov dword [esp + 8], eax
mov dword [esp + 4], str.CAM_Player_is_already_running_
lea eax, [ebp - 0x88]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xe
call fcn.65912068
lea eax, [ebp - 0x88]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x88
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xd
call fcn.65912a28
jmp 0x6588d67f
lea eax, [ebp - 0x88]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xe
call fcn.65912888
jmp 0x6588d6d7
lea eax, [ebp - 0x98]
mov dword [esp], eax
call fcn.65908a54
mov dword [esp + 4], 0
mov dword [esp], 0x659345c7
mov dword [ebp - 0xf8], 0xffffffff
call sub.KERNEL32.dll_CreateDirectoryA
sub esp, 8
test eax, eax
jne 0x6588da81
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0xb7
je 0x6588da81
lea edx, [ebp - 0x88]
mov dword [ebp - 0x154], edx
lea eax, [ebp - 0x78]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x78]
mov dword [esp + 8], eax
mov dword [esp + 4], str._directory_
lea eax, [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xc
call fcn.65912068
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x158], ecx
lea eax, [ebp - 0x68]
mov dword [ebp - 0x15c], eax
lea eax, [ebp - 0x48]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x659345c7
lea eax, [ebp - 0x58]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xb
call fcn.65912068
lea edx, [ebp - 0x58]
mov dword [ebp - 0x160], edx
lea eax, [ebp - 0xc8]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0xc8]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x659345d8
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xa
call fcn.65912068
lea eax, [ebp - 0x38]
mov ecx, dword [ebp - 0x160]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
mov dword [ebp - 0xf8], 9
call fcn.6592dd90
sub esp, 4
lea eax, [ebp - 0x68]
mov edx, dword [ebp - 0x158]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x154]
mov dword [esp], ecx
mov dword [ebp - 0xf8], 8
call fcn.6592dd90
sub esp, 4
lea eax, [ebp - 0x88]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x88
mov dword [esp], eax
mov dword [ebp - 0xf8], 7
call fcn.65912a28
jmp 0x6588d899
lea eax, [ebp - 0x88]
mov dword [esp], eax
mov dword [ebp - 0xf8], 8
call fcn.65912888
jmp 0x6588d8e2
lea eax, [ebp - 0x68]
mov dword [esp], eax
mov dword [ebp - 0xf8], 9
call fcn.65912888
jmp 0x6588d928
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xa
call fcn.65912888
jmp 0x6588d967
lea eax, [ebp - 0xc8]
mov dword [esp], eax
call fcn.65908a54
jmp 0x6588d9a6
lea eax, [ebp - 0x58]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xb
call fcn.65912888
jmp 0x6588d9e2
lea eax, [ebp - 0x48]
mov dword [esp], eax
call fcn.65908a54
jmp 0x6588da21
lea eax, [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xc
call fcn.65912888
jmp 0x6588da76
lea eax, [ebp - 0x78]
mov dword [esp], eax
call fcn.65908a54
mov dword [esp + 4], 0
mov dword [esp], 0x65934563
mov dword [ebp - 0xf8], 0xffffffff
call sub.KERNEL32.dll_CreateDirectoryA
sub esp, 8
test eax, eax
jne 0x6588df66
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0xb0], eax
cmp dword [ebp - 0xb0], 0xb7
je 0x6588df66
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x184], ecx
lea eax, [ebp - 0x68]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x68]
mov dword [esp + 8], eax
mov dword [esp + 4], str._directory_
lea eax, [ebp - 0x58]
mov dword [esp], eax
mov dword [ebp - 0xf8], 6
call fcn.65912068
lea eax, [ebp - 0x58]
mov dword [ebp - 0x188], eax
lea edx, [ebp - 0x78]
mov dword [ebp - 0x18c], edx
lea eax, [ebp - 0x98]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0x98]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x65934563
lea eax, [ebp - 0x88]
mov dword [esp], eax
mov dword [ebp - 0xf8], 5
call fcn.65912068
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x190], ecx
lea eax, [ebp - 0xc8]
mov dword [esp], eax
call fcn.65908a24
lea eax, [ebp - 0xc8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Tibiantis_was_unable_to_create
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [ebp - 0xf8], 4
call fcn.65912068
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 0x190]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x18c]
mov dword [esp], ecx
mov dword [ebp - 0xf8], 3
call fcn.6592dd90
sub esp, 4
lea eax, [ebp - 0x78]
mov edx, dword [ebp - 0x188]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x184]
mov dword [esp], ecx
mov dword [ebp - 0xf8], 2
call fcn.6592dd90
sub esp, 4
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x88
mov dword [esp], eax
mov dword [ebp - 0xf8], 1
call fcn.65912a28
jmp 0x6588dd7b
lea eax, [ebp - 0x48]
mov dword [esp], eax
mov dword [ebp - 0xf8], 2
call fcn.65912888
jmp 0x6588ddc1
lea eax, [ebp - 0x78]
mov dword [esp], eax
mov dword [ebp - 0xf8], 3
call fcn.65912888
jmp 0x6588de07
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [ebp - 0xf8], 4
call fcn.65912888
jmp 0x6588de46
lea eax, [ebp - 0xc8]
mov dword [esp], eax
call fcn.65908a54
jmp 0x6588de88
lea eax, [ebp - 0x88]
mov dword [esp], eax
mov dword [ebp - 0xf8], 5
call fcn.65912888
jmp 0x6588deca
lea eax, [ebp - 0x98]
mov dword [esp], eax
call fcn.65908a54
jmp 0x6588df09
lea eax, [ebp - 0x58]
mov dword [esp], eax
mov dword [ebp - 0xf8], 6
call fcn.65912888
jmp 0x6588df5b
lea eax, [ebp - 0x68]
mov dword [esp], eax
call fcn.65908a54
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [ebp - 0xf8], 0xffffffff
call fcn.6588f4a2
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.65890b54
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.6588ff1a
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.6588e802
lea eax, [ebp - 0xfc]
mov dword [esp], eax
call fcn.658e76f0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret