joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402b70
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x80
xor eax, eax
mov edx, 1
push ebx
push esi
mov ebx, ecx
push edi
mov ecx, 0x20
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
mov ecx, dword [0x40e438]
cmp dword [ecx + 0x160], edx
jne 0x402cb3
mov eax, dword [esp + 0x90]
mov ecx, dword [ecx + 0x68]
lea esi, [eax + eax*4]
lea esi, [eax + esi*2]
shl esi, 4
cmp byte [ecx + esi + 0xac], dl
jne 0x402cb3
cmp dword [ebx + 0x1448], 0x65
jne 0x402bdf
push 0x40d538
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebx
add esp, 0x80
ret 8
mov edx, dword [ebx + 0x4208]
push ebp
push eax
push 0x38
push edx
mov ecx, ebx
call fcn.00404e20
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
push eax
lea eax, [esp + 0x14]
push str._04d
push eax
call esi
mov ecx, dword [ebx + 0x4208]
mov edx, dword [esp + 0x1c]
push 0x44
lea eax, [esp + 0x20]
push str._07d
push eax
mov dword [ecx + 0x14], edx
call esi
mov ecx, dword [ebx + 0x4208]
mov edx, dword [esp + 0x28]
add ecx, 0xd
add esp, 0x18
mov dword [ecx], edx
mov ax, word [esp + 0x14]
mov word [ecx + 4], ax
mov dl, byte [esp + 0x16]
mov byte [ecx + 6], dl
mov eax, dword [0x40e438]
mov edi, dword [ebx + 0x4208]
mov ecx, 0x11
mov esi, dword [eax + 0x154]
add edi, 0x1e
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 0x20]
mov esi, dword [ebx + 0x4208]
add eax, 0x44
lea edx, [ebx + 0xc0]
mov ecx, eax
mov edi, edx
mov ebp, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x94]
push ecx
push eax
push edx
mov edx, dword [0x40e438]
lea ecx, [edx + 0x60]
call fcn.004099a0
push 0x44
push 0x38
push 2
mov ecx, ebx
call fcn.00405670
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x80
ret 8

Function at 0x4037b0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x40
push ebp
push esi
push str.ProgramReveiver
mov ebp, ecx
push 0
call dword [sym.imp.USER32.dll_FindWindowA]
mov esi, eax
test esi, esi
je 0x4037f7
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 2
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x32
call ebx
push 0
push 0
push 2
push esi
call edi
push 0x1f4
call ebx
pop edi
pop ebx
add ebp, 0x42c0
push str.ProgReceiver.exe
push ebp
lea eax, [esp + 0x10]
push str._s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 8]
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
pop esi
pop ebp
add esp, 0x40
ret
Function at 0x404ce0
Capabilities:
Copy file
Create directory
Delete file

Disassembly:
sub esp, 0x80
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x1448]
cmp eax, 0x65
jne 0x404dd2
mov edi, dword [esi + 0x30]
mov eax, dword [esi + 0x34]
inc edi
cmp eax, 3
mov dword [esi + 0x30], edi
mov ecx, edi
jl 0x404d8f
lea edi, [esi + 0x4238]
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push edi
lea eax, [esp + 0x10]
push 0x40d980
push eax
call ebx
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
mov ecx, esi
call fcn.00405820
push 0
push str.d:_delete_img
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push edi
push str.d:_delete_img
lea edx, [esp + 0x54]
push str._s__s
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x4c]
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, 0x20
xor eax, eax
rep stosd dword es:[edi], eax
pop ebx
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x1448], eax
pop edi
pop esi
add esp, 0x80
ret 4
cmp ecx, 3
jl 0x404e09
inc eax
lea ecx, [esp + 0x48]
push eax
push str.MGR_PC:_PACKET_SEND_RETRY_Retry:_d
push ecx
mov dword [esi + 0x34], eax
mov dword [esi + 0x1448], 0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x48]
mov ecx, esi
push edx
call fcn.00405820
pop edi
mov eax, 1
pop esi
add esp, 0x80
ret 4
cmp eax, 0x66
je 0x404dff
cmp eax, 0x67
je 0x404dff
cmp eax, 0x68
je 0x404dff
cmp eax, 0x6c
jne 0x404e09
push 0
mov ecx, esi
call fcn.00404820
pop edi
mov eax, 1
pop esi
add esp, 0x80
ret 4
push 0
push eax
mov ecx, esi
call fcn.004043a0
pop edi
mov eax, 1
pop esi
add esp, 0x80
ret 4
Function at 0x405230
Capabilities:
Access peb ldr_data
Copy file
Create directory
Delete file
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x40a2d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x110
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x64]
call fcn.00409dd6
mov eax, dword [esp + 0x130]
lea ecx, [esp + 0x14]
add eax, 0xffd87300
push ecx
mov dword [esp + 0x12c], 0
mov dword [esp + 0x18], eax
call dword [sym.imp.MSVCRT.dll_localtime]
xor edx, edx
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
inc edx
push ecx
add eax, 0x76c
push edx
push eax
lea ecx, [esp + 0x3c]
push str._04d_02d_02d
push ecx
call esi
mov ebp, dword [sym.imp.MSVCRT.dll__atoi64]
lea edx, [esp + 0x44]
push edx
call ebp
mov dword [esp + 0x78], eax
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0xbc]
rep stosd dword es:[edi], eax
push str.d:_enforce_img_
lea eax, [esp + 0xc0]
push 0x40d0d0
push eax
mov ebx, edx
call esi
add esp, 0x28
lea ecx, [esp + 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, dword [0x40e438]
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
mov eax, dword [edx + 0x68]
lea ecx, [esp + 0x3c]
push eax
push str.._s
push ecx
call esi
add esp, 0xc
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x64]
push 0
push edx
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
je 0x40543d
lea ecx, [esp + 0x64]
call sub.MFC42.DLL_CFileFind::FindNextFileA
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x68]
call sub.MFC42.DLL_CFileFind::GetFileName
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x3c]
push ecx
push 0x40d0d0
push edx
call esi
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], eax
lea eax, [esp + 0x28]
push eax
call ebp
add esp, 0x10
cmp ebx, edx
jg 0x4053a2
jl 0x405420
cmp dword [esp + 0x5c], eax
jb 0x405420
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0xa0]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x3c]
lea eax, [esp + 0x80]
push ecx
push edx
push str._s_s
push eax
call esi
add esp, 0x10
push 0
push str.d:_delete_img
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [esp + 0x3c]
lea edx, [esp + 0xe0]
push ecx
push str.d:_delete_img
push str._s__s
push edx
call esi
add esp, 0x10
lea eax, [esp + 0xe0]
lea ecx, [esp + 0x80]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea edx, [esp + 0x80]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x10]
mov byte [esp + 0x128], 0
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40533a
lea ecx, [esp + 0x64]
mov dword [esp + 0x128], 0xffffffff
call sub.MFC42.DLL_CFileFind::CFileFind
mov ecx, dword [esp + 0x120]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x11c
ret 4
Function at 0x405470
Capabilities:
Access peb ldr_data
Delete file
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x40a2f6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xd0
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x64]
call fcn.00409dd6
mov eax, dword [esp + 0xf0]
lea ecx, [esp + 0x14]
add eax, 0xffe5a200
push ecx
mov dword [esp + 0xec], 0
mov dword [esp + 0x18], eax
call dword [sym.imp.MSVCRT.dll_localtime]
xor edx, edx
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
inc edx
push ecx
add eax, 0x76c
push edx
push eax
lea ecx, [esp + 0x3c]
push str._04d_02d_02d
push ecx
call esi
mov ebp, dword [sym.imp.MSVCRT.dll__atoi64]
lea edx, [esp + 0x44]
push edx
call ebp
mov dword [esp + 0x58], eax
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0xbc]
rep stosd dword es:[edi], eax
push str.d:_not_plate_
lea eax, [esp + 0xc0]
push 0x40d0d0
push eax
mov ebx, edx
call esi
add esp, 0x28
lea ecx, [esp + 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, dword [0x40e438]
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
mov eax, dword [edx + 0x68]
lea ecx, [esp + 0x44]
push eax
push str.._s
push ecx
call esi
add esp, 0xc
lea edx, [esp + 0x44]
lea ecx, [esp + 0x64]
push 0
push edx
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
je 0x405638
lea ecx, [esp + 0x64]
call sub.MFC42.DLL_CFileFind::FindNextFileA
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x68]
call sub.MFC42.DLL_CFileFind::GetFileName
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x44]
push ecx
push 0x40d0d0
push edx
call esi
xor eax, eax
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x54]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], eax
lea eax, [esp + 0x28]
push eax
call ebp
add esp, 0x10
cmp ebx, edx
jg 0x4055de
jl 0x40561b
cmp dword [esp + 0x3c], eax
jb 0x40561b
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0xa0]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x44]
lea eax, [esp + 0x80]
push ecx
push edx
push str._s_s
push eax
call esi
add esp, 0x10
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x10]
mov byte [esp + 0xe8], 0
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40557a
lea ecx, [esp + 0x64]
mov dword [esp + 0xe8], 0xffffffff
call sub.MFC42.DLL_CFileFind::CFileFind
mov ecx, dword [esp + 0xe0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xdc
ret 4
Function at 0x405820
Capabilities:
Print debug messages
Write file on windows

Disassembly:
sub esp, 0x190
push esi
mov esi, dword [esp + 0x198]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x40e438]
cmp dword [eax + 0x160], 1
jne 0x40593a
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [0x40e438]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x98]
rep stosd dword es:[edi], eax
mov eax, dword [edx + 0x14c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x12]
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push eax
mov eax, dword [esp + 0x18]
and ecx, 0xffff
and edx, 0xffff
push ecx
and eax, 0xffff
push edx
push eax
lea ecx, [esp + 0xac]
push str._02d:_02d:_02d___s___s__n
push ecx
call esi
mov edx, dword [0x40e438]
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
mov ecx, dword [edx + 0x14c]
mov edx, dword [esp + 0x2a]
mov eax, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x2a]
and edx, 0xffff
and ecx, 0xffff
and eax, 0xffff
push edx
push ecx
push eax
push eax
push str.d:_System_Log
lea edx, [esp + 0x4c]
push str._s__d__d_02d_02d._s
push edx
call esi
lea edi, [esp + 0xd4]
or ecx, 0xffffffff
xor eax, eax
push 0x40d880
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x58]
dec ecx
push eax
mov edi, ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x44
test esi, esi
je 0x40593a
push esi
push 1
lea ecx, [esp + 0xa0]
push edi
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
pop edi
pop esi
add esp, 0x190
ret 4

Function at 0x405a40
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push esi
mov esi, dword [esp + 0xc]
or eax, 0xffffffff
xor ecx, ecx
and esi, 0xffff
jle 0x405a7a
push ebx
push edi
mov edi, dword [esp + 0x10]
xor edx, edx
mov ebx, eax
mov dl, byte [ecx + edi]
and ebx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x40b370]
xor eax, edx
inc ecx
cmp ecx, esi
jl 0x405a58
pop edi
pop ebx
pop esi
ret

Function at 0x405fd0
Capabilities:
Read .ini file

Disassembly:
mov edx, dword [esp + 4]
sub esp, 8
add ecx, 4
lea eax, [esp]
push ecx
mov ecx, dword [esp + 0x14]
push 8
push eax
push 0x40e43c
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
ja 0x405fff
xor eax, eax
add esp, 8
ret 0xc
lea eax, [esp]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [ecx], eax
mov eax, 1
add esp, 8
ret 0xc
Function at 0x406020
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x20
mov edx, ecx
mov ecx, 8
xor eax, eax
push edi
lea edi, [esp + 4]
add edx, 4
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
lea eax, [esp + 8]
push 0x20
push eax
push 0x40e43c
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
ja 0x406060
xor eax, eax
pop edi
add esp, 0x20
ret 0xc
lea edi, [esp + 4]
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x34]
lea esi, [esp + 8]
not ecx
dec ecx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
pop edi
add esp, 0x20
ret 0xc

Function at 0x4060c0
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 8]
push str.__d__s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, 1
add esp, 0x100
ret 4

Function at 0x4063f0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
push 5
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call edi
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x20]
lea ecx, [esp + 8]
push eax
mov eax, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
je 0x406455
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x406455
push str.WriteFile_error_
mov ecx, esi
call fcn.004060c0
pop edi
xor eax, eax
pop esi
pop ecx
ret 0x24
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 8]
push 5
mov dword [edx], eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, 1
pop esi
pop ecx
ret 0x24

Function at 0x406590
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
neg eax
sbb eax, eax
inc eax
add esp, 0x190
ret
Function at 0x4065c0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x18
push ebp
push esi
push edi
push 6
push 1
push 2
mov word [esp + 0x18], 1
mov word [esp + 0x1a], 0
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4065f2
pop edi
pop esi
or eax, eax
pop ebp
add esp, 0x18
ret 4
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0xc]
push 4
push eax
push 0x80
push 0xffff
push esi
call edi
mov ebp, dword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x406629
push esi
call ebp
test eax, eax
je 0x406629
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret 4
lea ecx, [esp + 0x10]
push 4
push ecx
push 1
push 6
push esi
mov dword [esp + 0x24], 1
call edi
test eax, eax
je 0x406656
push esi
call ebp
test eax, eax
jne 0x406656
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret 4
mov eax, dword [esp + 0x28]
test ax, ax
je 0x4066a9
push eax
mov word [esp + 0x18], 2
mov dword [esp + 0x1c], 0
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x16], ax
xor edx, edx
lea eax, [esp + 0x14]
push 0x10
mov dword [esp + 0x20], edx
push eax
push esi
mov dword [esp + 0x2c], edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4066a9
push esi
call ebp
test eax, eax
je 0x4066a9
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret 4
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 0x18
ret 4

Function at 0x4066e0
Capabilities:
Connect socket

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x10
test eax, eax
jne 0x4066f0
mov eax, 0x7f000001
push eax
mov word [esp + 4], 2
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 2], ax
mov eax, dword [esp + 0x14]
xor ecx, ecx
lea edx, [esp]
push 0x10
mov dword [esp + 0xc], ecx
push edx
push eax
mov dword [esp + 0x18], ecx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x40674a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
cmp eax, 0x2733
sete cl
mov eax, ecx
add esp, 0x10
ret 0xc
mov eax, 1
add esp, 0x10
ret 0xc

Function at 0x406760
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0x18]
test ebx, ebx
jle 0x406791
mov ebp, dword [esp + 0x14]
mov eax, ebx
push 0
sub eax, esi
push eax
push edi
push ebp
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jl 0x40679a
add esi, eax
add edi, eax
cmp esi, ebx
jl 0x406776
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x406791
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 0xc

Function at 0x4067c0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jge 0x4067ea
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
ret 0xc
Function at 0x4067f0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x314
mov al, byte [esp + 0x31c]
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0x320]
mov dword [esp + 0x10], esi
test al, 1
mov dword [esp + 0x114], esi
mov dword [esp + 0x218], esi
je 0x40682a
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], 1
test al, 2
je 0x406840
mov dword [esp + 0x118], edi
mov dword [esp + 0x114], 1
test al, 4
je 0x406856
mov dword [esp + 0x21c], edi
mov dword [esp + 0x218], 1
mov ecx, dword [esp + 0x328]
cmp ecx, 0xffff
jne 0x40687d
lea eax, [esp + 0x218]
push esi
lea ecx, [esp + 0x118]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
jmp 0x4068c6
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 8], edx
mov ecx, 0x3e8
cdq
idiv ecx
lea ecx, [esp + 0x218]
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
lea eax, [esp + 8]
shl edx, 3
mov dword [esp + 0xc], edx
push eax
lea edx, [esp + 0x118]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push 1
call dword [sym.imp.WS2_32.dll_select]
lea ecx, [esp + 0x10]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4068e2
mov esi, 1
lea edx, [esp + 0x114]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4068f7
or esi, 2
lea eax, [esp + 0x218]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40690c
or esi, 4
mov ax, si
pop edi
pop esi
add esp, 0x314
ret 0xc

Function at 0x406b10
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
push 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x406b25
add esp, 0x10
ret 4
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ebx
push esi
mov edx, ecx
mov esi, dword [eax]
push edi
lea edi, [esp + 0x10]
mov ebx, dword [sym.imp.WS2_32.dll_ntohl]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
test esi, esi
je 0x406b5a
push edi
call ebx
mov dword [esi], eax
push edi
call ebx
pop edi
pop esi
pop ebx
add esp, 0x10
ret 4
Function at 0x407b50
Capabilities:
Create thread

Disassembly:
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 0x6c]
test eax, eax
jle 0x407baa
push ebp
lea ebp, [esi + 0x60]
xor edi, edi
push ebx
mov ecx, ebp
call fcn.00409b40
mov eax, dword [esi + 0x68]
mov dword [eax + edi + 0x7c], ebx
mov ecx, dword [esi + 0x68]
lea edx, [ecx + edi + 0x84]
push edx
push 0
push esi
push 0x408ce0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi + 0x68]
inc ebx
mov dword [ecx + edi + 0x80], eax
mov eax, dword [esi + 0x6c]
add edi, 0xb0
cmp ebx, eax
jl 0x407b65
pop ebp
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x407c23
lea edx, [esp + 0xc]
mov dword [esi + 0x110], 1
push edx
push 0
push esi
push 0x408700
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 1
push 0
mov dword [esi + 0x1c0], eax
call edi
push 0
push 0
push 1
push 0
mov dword [esi + 0x194], eax
call edi
push 0
push 0
push 1
push 0
mov dword [esi + 0x1bc], eax
call edi
mov ecx, dword [esi + 0x194]
mov dword [esi + 0x1a8], eax
mov dword [esi + 0x18c], ecx
mov dword [esi + 0x190], eax
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x407c30
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x20
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x407d4b
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esi + 0x114]
push str.COM1
push edi
call ebx
add esp, 8
mov dword [esi + 0x128], 0
mov al, byte [esi + 0x128]
mov dword [esi + 0x124], 0
mov cl, byte [esi + 0x124]
mov dword [esi + 0x120], 8
mov dl, byte [esi + 0x120]
push eax
push ecx
push edx
push 0x1c200
push edi
lea ecx, [esi + 0xec]
mov dword [esi + 0x11c], 0x1c200
call fcn.00406100
mov dword [esi + 0x108], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x407ce2
mov ecx, dword [esi + 0x108]
lea edx, [esp + 0xc]
push ecx
push eax
push str.SMS:_GetLastError_:__d__d_
push edx
call ebx
mov ecx, dword [esi + 0x104]
add esp, 0x10
lea eax, [esp + 0xc]
push eax
call fcn.00405820
mov eax, dword [esi + 0x108]
pop ebx
test eax, eax
je 0x407d4b
mov ecx, dword [esi + 0x20]
mov edi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x2710
push 0x17
push ecx
call edi
mov eax, dword [esi + 0x70]
test eax, eax
jne 0x407d2c
mov eax, dword [esi + 0x94]
push 0
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
mov eax, dword [esi + 0x20]
shl edx, 5
push edx
push 0x18
push eax
call edi
push str.__create_Serial_Comm_Thread..
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [esi + 0x10c], 1
mov dword [esi + 0x1c4], 0
pop edi
pop esi
add esp, 0x20
ret