joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1009f4ab
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
xor ecx, ecx
test eax, eax
jne 0x1009f4d2
mov eax, ecx
mov dword [ebp - 4], eax
jmp 0x1009f4d5
mov eax, dword [ebp - 4]
push esi
mov esi, dword [ebp + 0xc]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.1009f487
pop esi
leave
ret 8

Function at 0x100a493f
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
xor edx, edx
push esi
mov esi, dword [ebp + 0xc]
cmp dword [ebp + 0x10], edx
jbe 0x100a4962
movzx eax, byte [esi + edx]
xor eax, ecx
imul ecx, eax, 0x1000193
inc edx
cmp edx, dword [ebp + 0x10]
jb 0x100a4950
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x100b17bd
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
call fcn.100c874a
mov eax, dword [eax + 0x14]
test eax, eax
je 0x100b1800
and dword [ebp - 4], 0
lea ecx, [ebp - 4]
push 2
push ecx
push 0x22
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
movzx eax, word [ebp - 4]
sub eax, 0x30
je 0x100b1800
sub eax, 1
je 0x100b17fb
sub eax, 1
je 0x100b17f7
xor eax, eax
leave
ret
push 3
jmp 0x100b1802
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret

Function at 0x100d0878
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100f8a4c
push 0x100f8a44
push str.FlsAlloc
push 0x1e
call fcn.100d06a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100d08ac
push dword [ebp + 8]
mov ecx, esi
call dword [0x100e733c]
call esi
jmp 0x100d08b2
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x100d08f6
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100f8a5c
push 0x100f8a54
push str.FlsGetValue
push 0x20
call fcn.100d06a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100d092d
push dword [ebp + 8]
mov ecx, esi
call dword [0x100e733c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x100d3d5f
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x100d3dfc
push ebx
push esi
call fcn.100d3d28
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.100d248f
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x100d3da9
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100d3dfb
push edi
push eax
call fcn.100cf050
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x100d3dc9
call fcn.100cf016
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100d3dfa
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.100d248f
add esp, 0x20
test eax, eax
jne 0x100d3de8
push edi
call fcn.100cf016
jmp 0x100d3df0
push ebx
call fcn.100cf016
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x100d3dff
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x100d3e10
pop esi
ret
push ebx
push edi
push esi
call fcn.100d3d28
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.100cf050
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x100d3e38
push ebx
push esi
push edi
call fcn.100b3360
add esp, 0xc
push 0
call fcn.100cf016
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x100d41fc
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.100d3e4d
Function at 0x100dbfb0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x100dbfdd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x100dbfdd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401380
Capabilities:
Initialize winsock library
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1b4
mov eax, dword [0x443070]
xor eax, esp
mov dword [esp + 0x1b0], eax
push ebx
push esi
push edi
push 0x43e820
push 0
call fcn.00410346
add esp, 8
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x405640
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0
mov dword [0x446edc], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x446ed8], eax
call fcn.004015a0
test ax, ax
jne 0x401407
push 0x10
push str.Register_Class
push str.Failed_to_register_window_class.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b0]
xor ecx, esp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
call fcn.00401620
test al, al
jne 0x40143c
push 0x10
push str.Window_Instance
push str.Failed_to_initiaize_window_instance.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b0]
xor ecx, esp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
mov eax, dword [0x446ed4]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push ecx
push str..ConnectServer.ini
push 1
push 0x43eb70
push 0x43eb74
mov dword [0x4b27f0], eax
call edi
test eax, eax
setne al
movzx eax, al
push eax
call fcn.00404e90
lea eax, [esp + 0x28]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x401514
push str..ConnectServer.ini
push 0xad75
push str.ConnectServerPortTCP
push str.ConnectServerInfo
call edi
push str..ConnectServer.ini
push 0xd905
push str.ConnectServerPortUDP
push str.ConnectServerInfo
movzx esi, ax
call edi
push str..ConnectServer.ini
push 0
push str.MaxIpConnection
push str.ConnectServerInfo
movzx ebx, ax
call edi
push esi
mov dword [0x446ed0], eax
call fcn.00407170
test al, al
je 0x40152a
push ebx
call fcn.00408360
test al, al
je 0x40152a
push ecx
call fcn.00406060
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x3e8
push 0x64
push dword [0x446ed4]
call esi
push 0
push 0x1388
push 0x65
push dword [0x446ed4]
call esi
jmp 0x40152a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
lea eax, [esp + 0xc]
push 0
push 0
push 0
push eax
call esi
test eax, eax
je 0x401577
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
nop dword [eax]
lea eax, [esp + 0xc]
push eax
call edi
lea eax, [esp + 0xc]
push eax
call ebx
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0
push 0
lea eax, [esp + 0x18]
push eax
call esi
test eax, eax
jne 0x401550
push dword [0x446edc]
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov ecx, dword [esp + 0x1bc]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
Function at 0x404e90
Capabilities:
Create directory

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x443070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x4b27e4]
push esi
push edi
test eax, eax
js 0x404f98
cmp eax, 1
jge 0x404f98
imul edi, eax, 0x214
inc eax
push 0x43eb70
mov dword [0x4b27e4], eax
mov al, byte [ebx + 8]
push 0x100
add edi, 0x4b25d0
lea esi, [edi + 1]
mov byte [edi], al
push esi
call fcn.00410097
add esp, 0xc
cmp byte [edi], 0
je 0x404f98
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [ebp - 0xe]
lea esi, [edi + 0x110]
movzx ecx, word [ebp - 0x12]
movzx eax, word [ebp - 0x14]
push edx
push ecx
push eax
mov dword [edi + 0x10c], eax
lea eax, [edi + 1]
push eax
push str.._s_04d__02d__02d.txt
push esi
mov dword [edi + 0x104], edx
mov dword [edi + 0x108], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x210], eax
cmp eax, 0xffffffff
jne 0x404f77
mov byte [edi], 0
jmp 0x404f98
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x404f98
push dword [edi + 0x210]
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040add8
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
Function at 0x404fb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x443070]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push esi
push edi
test eax, eax
js 0x405196
cmp eax, dword [ecx + 0x214]
jge 0x405196
imul edi, eax, 0x214
add edi, ecx
cmp byte [edi], 0
je 0x405196
lea eax, [ebp - 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x816]
cmp eax, dword [edi + 0x104]
jne 0x40502e
movzx eax, word [ebp - 0x81a]
cmp eax, dword [edi + 0x108]
jne 0x40502e
movzx eax, word [ebp - 0x81c]
cmp eax, dword [edi + 0x10c]
je 0x4050e5
push dword [edi + 0x210]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx edx, word [ebp - 0x816]
lea esi, [edi + 0x110]
movzx ecx, word [ebp - 0x81a]
movzx eax, word [ebp - 0x81c]
push edx
push ecx
push eax
mov dword [edi + 0x10c], eax
lea eax, [edi + 1]
push eax
push str.._s_04d__02d__02d.txt
push esi
mov dword [edi + 0x104], edx
mov dword [edi + 0x108], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x210], eax
cmp eax, 0xffffffff
jne 0x4050b4
mov byte [edi], 0
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4050e5
push dword [edi + 0x210]
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
push 0x400
lea eax, [ebp - 0x80c]
push 0
push eax
call fcn.0040dd80
add esp, 0xc
lea eax, [ebp + 0x14]
push eax
push 0
push dword [ebp + 0x10]
lea eax, [ebp - 0x80c]
push 0x400
push eax
call fcn.00403d50
add esp, 0x14
lea eax, [ebp - 0x40c]
push 0x400
push 0
push eax
call fcn.0040dd80
add esp, 0xc
lea eax, [ebp - 0x80c]
push eax
movzx eax, word [ebp - 0x810]
push eax
movzx eax, word [ebp - 0x812]
push eax
movzx eax, word [ebp - 0x814]
push eax
lea eax, [ebp - 0x40c]
push str._02d:_02d:_02d__s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [ebp - 0x40c]
add esp, 0x18
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405170
push 0
lea eax, [ebp - 0x820]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x40c]
push eax
push dword [edi + 0x210]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.0040add8
mov esp, ebp
pop ebp
ret
Function at 0x4051f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
push str.ServerList.dat
push 0x104
lea eax, [edi + 8]
push eax
call fcn.00410097
push 0x43eac8
lea esi, [edi + 4]
push str.ServerList.dat
push esi
call fcn.0041273e
add esp, 0x18
test eax, eax
je 0x40522f
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4
push dword [esi]
lea eax, [ebp - 4]
push 4
push 1
push eax
call fcn.0041295e
push dword [esi]
call fcn.00412afe
mov eax, dword [ebp - 4]
add esp, 0x14
cmp al, 0xef
jne 0x405268
cmp ah, 0xbb
jne 0x405268
cmp byte [ebp - 2], 0xbf
jne 0x405268
push 0
push 3
push dword [esi]
call fcn.00412e4b
add esp, 0xc
mov dword [edi + 0x174], 1
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x4063f0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ecx
cmp byte [0x4b25b8], 0
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
je 0x406431
call edi
sub eax, dword [0x4b25bc]
cmp eax, 0x2710
jbe 0x406431
push str._ServerList__JoinServer_offline
push 1
mov byte [0x4b25b8], 0
mov dword [0x4b25bc], 0
call fcn.00408750
add esp, 8
mov eax, dword [0x4b25c4]
mov esi, dword [eax]
cmp esi, eax
je 0x4064bf
cmp byte [esi + 0x49], 0
je 0x406475
call edi
sub eax, dword [esi + 0x4c]
cmp eax, 0x2710
jbe 0x406475
mov byte [esi + 0x49], 0
mov dword [esi + 0x4c], 0
movzx eax, word [esi + 0x14]
push eax
lea eax, [esi + 0x16]
push eax
push str._ServerList__GameServer_offline___s____d_
push 0
call fcn.00408750
add esp, 0x10
cmp byte [esi + 0xd], 0
jne 0x4064b7
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x40649c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x4064b7
nop
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x406490
jmp 0x4064b7
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x4064b5
cmp esi, dword [eax + 8]
jne 0x4064b5
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x4064a5
mov esi, eax
cmp esi, dword [0x4b25c4]
jne 0x406440
pop edi
pop esi
pop ecx
ret
Function at 0x4071e0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x443070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x4b4764]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40721e
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [0x4b4764]
call edi
mov dword [0x4b4764], 0
mov eax, dword [0x4b4760]
test eax, eax
je 0x407234
push eax
call edi
mov dword [0x4b4760], 0
push esi
mov ecx, 0x4b4734
call fcn.00405750
push 0x4b4734
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x4b475c]
push 0x4b4734
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
lea eax, [ebp - 0x104]
push str.MuEmu_ConnectServer_Ex097__QueueSize_:__d_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
push dword [0x4b27f0]
call dword [sym.imp.USER32.dll_SetWindowTextA]
xor esi, esi
mov eax, dword [esi + 0x4b4710]
test eax, eax
je 0x4072ab
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x4b4710]
call edi
mov dword [esi + 0x4b4710], 0
add esi, 4
cmp esi, 0x20
jb 0x407286
mov eax, dword [0x4b470c]
pop esi
test eax, eax
je 0x4072d8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [0x4b470c]
call edi
mov dword [0x4b470c], 0
mov eax, dword [0x4b4704]
test eax, eax
je 0x4072ee
push eax
call edi
mov dword [0x4b4704], 0
mov eax, dword [0x4b4700]
pop edi
cmp eax, 0xffffffff
je 0x40730a
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x4b4700], 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
Function at 0x407320
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x443070]
xor eax, ebp
mov dword [ebp - 4], eax
push 1
push 0
push 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [0x4b4700], eax
cmp eax, 0xffffffff
jne 0x407372
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketManager__WSASocketW___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
mov eax, 2
push 0
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x10], eax
movzx eax, word [0x4b4708]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x14]
push 0x10
push eax
push dword [0x4b4700]
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4073d5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketManager__bind___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
push 5
push dword [0x4b4700]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40740e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketManager__listen___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040add8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
call fcn.0040add8
mov esp, ebp
pop ebp
ret

Function at 0x407420
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push esi
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40744e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketManager__socket___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
pop esi
ret
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [0x4b4704], eax
test eax, eax
jne 0x407485
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManager__CreateIoCompletionPort___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
pop esi
ret
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, 1
pop esi
ret

Function at 0x407490
Capabilities:
Create thread

Disassembly:
push 0
push 0
push 0x4b4700
push 0x407ef0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4b470c], eax
test eax, eax
jne 0x4074ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManager__CreateThread___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
ret
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x4074f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManager__SetThreadPriority___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
ret
mov al, 1
ret
Function at 0x407500
Capabilities:
Create thread
Get system information on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x10]
mov ecx, 8
cmp eax, ecx
cmova eax, ecx
xor esi, esi
mov dword [0x4b4730], eax
test eax, eax
je 0x407579
mov edi, 0x4b4710
push 0
push 0
push 0x4b4700
push 0x4080c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [edi], eax
test eax, eax
je 0x4075a5
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
je 0x407584
inc esi
add edi, 4
cmp esi, dword [0x4b4730]
jb 0x407542
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManager__SetThreadPriority___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManager__CreateThread___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret

Function at 0x4075d0
Capabilities:
Create thread

Disassembly:
push 0
push 0x800
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov dword [0x4b4760], eax
test eax, eax
jne 0x407603
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManager__CreateSemaphore___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
ret
push 0
push 0
push 0x4b4700
push 0x4081c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4b4764], eax
test eax, eax
jne 0x40763d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManager__CreateThread___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
ret
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test eax, eax
jne 0x407663
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManager__SetThreadPriority___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
xor al, al
ret
mov al, 1
ret
Function at 0x407920
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov cl, byte [ebx]
cmp cl, 0xc1
je 0x40794c
cmp cl, 0xc3
je 0x40794c
cmp cl, 0xc2
je 0x407947
cmp cl, 0xc4
je 0x407947
mov ch, byte [ebp + 0x13]
jmp 0x40794f
mov ch, byte [ebx + 3]
jmp 0x40794f
mov ch, byte [ebx + 2]
cmp cl, 0xc1
jne 0x407959
mov al, byte [ebx + 3]
jmp 0x40795c
mov al, byte [ebx + 4]
mov edx, dword [ebp + 0x10]
push edx
movzx eax, al
push eax
movzx eax, ch
push eax
movzx eax, cl
push eax
push str.SEND
push str.__s__Header:_0x_02X__Head:_0x_02X__SubHead:_0x_02X__Size:__d
push 2
push 0x446ee4
call fcn.00401bb0
add esp, 0x20
push 0x4b4768
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp + 8]
xor eax, eax
test esi, esi
js 0x4079a2
cmp esi, 0x2710
setl al
test eax, eax
je 0x407ae5
imul eax, esi, 0x2c
xor ecx, ecx
add eax, 0x446ef0
mov dword [ebp - 4], eax
mov edx, dword [eax]
test edx, edx
js 0x4079c6
cmp edx, 0x2710
setl cl
test ecx, ecx
je 0x407ae5
cmp dword [eax + 4], 0
je 0x407ae5
cmp dword [eax + 0x18], 0xffffffff
je 0x407ae5
mov ecx, dword [ebp + 0x10]
cmp ecx, 0x800
jle 0x407a03
push ecx
push esi
push str._SocketManager__Max_msg_size__Type:_1__Index:__d__Size:__d_
push 1
call fcn.00408750
add esp, 0x10
jmp 0x407ae5
mov edi, dword [eax + 0x20]
cmp dword [edi + 0x20], 0
jle 0x407a65
mov edx, dword [edi + 0x1028]
lea eax, [edx + ecx]
cmp eax, 0x800
jle 0x407a33
push eax
push esi
push str._SocketManager__Max_msg_size__Type:_2__Index:__d__Size:__d_
push 1
call fcn.00408750
add esp, 0x10
push esi
jmp 0x407adb
push ecx
lea eax, [edi + 0x828]
add eax, edx
push ebx
push eax
call fcn.0040d800
mov edx, dword [ebp + 0x10]
add esp, 0xc
add dword [edi + 0x1028], edx
push 0x4b4768
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push ecx
lea esi, [edi + 0x24]
push ebx
push esi
call fcn.0040d800
mov edx, dword [ebp + 0x10]
lea ecx, [ebp + 0xc]
add esp, 0xc
mov dword [edi + 0x14], edx
lea eax, [edi + 0x14]
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], 1
mov dword [edi + 0x20], edx
push 0
push edi
push 0
push ecx
push 1
push eax
mov eax, dword [ebp - 4]
mov dword [edi + 0x824], 0
mov dword [ebp + 0xc], 0
push dword [eax + 0x18]
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x407a4f
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x407a4f
call esi
push eax
push str._SocketManager__WSASend___failed_with_error:__d
push 1
call fcn.00408750
add esp, 0xc
push dword [ebp + 8]
mov ecx, 0x4b4700
call fcn.00407b00
push 0x4b4768
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc