joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4033e5
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
cmp dword [ebp + 8], 0
mov byte [ebp - 0x50], 0
je 0x40340a
push 0x50
lea eax, [ebp - 0x50]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp byte [ebp - 0x50], 0
jne 0x40341e
push 0x50
lea eax, [ebp - 0x50]
push eax
push 0x50
push dword [0x431394]
call dword [sym.imp.USER32.dll_LoadStringA]
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x50]
or ecx, 0x30
test byte [ebp + 0x10], 0x70
cmovne ecx, dword [ebp + 0x10]
or ecx, 0x2000
push ecx
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
leave
ret 0xc

Function at 0x403461
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 2
pop esi
push dword [ebp + 0xc]
call fcn.004041d7
push 0x35
lea ebx, [eax + 1]
lea eax, [ebx*2 + 0xa0]
push eax
call fcn.00401286
mov edi, eax
test edi, edi
je 0x4034e4
push ebx
push edi
push dword [ebp + 0xc]
lea esi, [edi + ebx*2]
call fcn.00407bb6
mov ebx, dword [ebp + 8]
xor eax, eax
mov word [esi], ax
test ebx, ebx
je 0x4034b3
push 0x50
push esi
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextW]
cmp word [esi], 0
jne 0x4034c4
push 0x50
push esi
push 0x50
push dword [0x431394]
call dword [sym.imp.USER32.dll_LoadStringW]
mov ecx, dword [ebp + 0x10]
or ecx, 0x30
test byte [ebp + 0x10], 0x70
cmovne ecx, dword [ebp + 0x10]
or ecx, 0x2000
push ecx
push esi
push edi
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov esi, eax
push edi
call fcn.00404070
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x403a63
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea eax, [ebp - 0xc]
push esi
push eax
movzx eax, word [ebp + 0x10]
push 0x42973c
push eax
call fcn.00406400
mov esi, eax
test esi, esi
je 0x403aab
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x403aa4
push 0
lea eax, [ebp - 0xc]
push eax
push 2
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00403adf
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop esi
leave
ret 0xc

Function at 0x404558
Capabilities:
Get graphical window text

Disassembly:
push ebx
push ebp
push esi
xor esi, esi
push edi
cmp dword [esp + 0x18], esi
je 0x404576
push dword [esp + 0x18]
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebx, eax
jmp 0x40457a
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
push 0x5c
lea ebp, [eax + 2]
imul eax, ebp, 6
push eax
call fcn.00401286
mov edi, eax
test edi, edi
je 0x4045b9
push ebp
push edi
push ebx
lea esi, [edi + ebp*2]
call dword [sym.imp.USER32.dll_GetWindowTextW]
push esi
xor eax, eax
push edi
mov dword [esi - 2], eax
call fcn.00407a67
push dword [esp + 0x1c]
push esi
call fcn.00402bba
mov esi, eax
push edi
call fcn.00404070
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x404642
Capabilities:
Get file attributes

Disassembly:
push esi
push edi
push 0x1b
push dword [esp + 0x10]
or edi, 0xffffffff
call fcn.00407cb4
mov esi, eax
test esi, esi
je 0x40466b
push 0x5c
push 0x2f
push esi
call fcn.004021e3
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
push esi
call fcn.00404070
mov eax, edi
pop edi
pop esi
ret 4
Function at 0x404c1e
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x60
xor eax, eax
push ebx
mov ebx, dword [esp + 0x74]
push ebp
push esi
push edi
mov edi, eax
test ebx, ebx
jne 0x404c3a
push 8
call fcn.00404b1d
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push dword [esp + 0x84]
lea ebp, [eax + 1]
mov dword [esp + 0x84], ebp
call fcn.00404177
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x14], eax
add eax, ebp
add eax, esi
push 0x26
lea eax, [eax*2 + 0x410]
push eax
call fcn.00401286
mov ebp, eax
test ebp, ebp
je 0x404e2f
mov eax, dword [esp + 0x80]
lea edi, [ebp + 0x30c]
lea ecx, [edi + esi*2]
push esi
push edi
push dword [esp + 0x80]
lea ecx, [ecx + eax*2]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], ecx
lea eax, [ecx + eax*2]
mov dword [esp + 0x20], eax
call fcn.00407bb6
push 0x5c
push 0x2f
push edi
call fcn.004021e3
push dword [esp + 0x80]
lea eax, [edi + esi*2]
push eax
push ebx
call fcn.00407bb6
mov ebx, dword [esp + 0x84]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x80], eax
cmp byte [ebx], 0
je 0x404d14
mov esi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push esi
push ebx
call fcn.00407bb6
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push esi
add ebx, eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2]
xor eax, eax
add esi, 2
mov word [esi], ax
cmp byte [ebx], al
jne 0x404ce0
mov esi, dword [esp + 0x7c]
mov ebx, dword [esp + 0x14]
push 0x82
push ebx
push dword [esp + 0x90]
call fcn.00407bb6
push 0x58
lea eax, [esp + 0x1c]
push 0
push eax
call sub.ntdll.dll_memset
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x24], eax
lea eax, [edi + esi*2]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x58
mov dword [esp + 0x3c], 0x104
mov dword [esp + 0x58], ebx
mov dword [esp + 0x38], edi
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
mov dword [esp + 0x84], eax
test eax, eax
je 0x404df0
dec esi
jmp 0x404ddd
test esi, esi
jle 0x404de8
push 0x30c
push ebp
push edi
call fcn.00407ad3
push 0x2f
push 0x5c
push ebp
call fcn.004021b6
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [eax + 1]
cmp esi, ebx
jl 0x404de6
push ebx
push ebp
push dword [esp + 0x80]
call sub.ntdll.dll_memcpy
add dword [esp + 0x84], ebx
add esp, 0xc
sub esi, ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [edi + eax*2]
add edi, 2
xor ecx, ecx
cmp word [edi], cx
jne 0x404d8e
jmp 0x404de8
xor ecx, ecx
mov eax, dword [esp + 0x78]
mov byte [eax], cl
jmp 0x404e28
call dword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
cmp eax, 0x3002
jne 0x404e09
push str.GetOpenFileName__:_Invalid_File_Name
call fcn.004067fd
jmp 0x404e27
cmp eax, 0x3003
jne 0x404e17
push str.GetOpenFileName__:_Selected_too_many_files
jmp 0x404e02
test eax, eax
je 0x404e28
push eax
push str.GetOpenFileName___Err_d
call fcn.004067fd
pop ecx
pop ecx
mov edi, dword [esp + 0x84]
push ebp
call fcn.00404070
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret 0x1c
Function at 0x406fba
Capabilities:
Set file attributes

Disassembly:
push esi
push edi
push 0x1c
push dword [esp + 0x10]
xor edi, edi
call fcn.00407cb4
mov esi, eax
test esi, esi
je 0x406fe6
push 0x5c
push 0x2f
push esi
call fcn.004021e3
push dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edi, eax
push esi
call fcn.00404070
mov eax, edi
pop edi
pop esi
ret 8

Function at 0x4071bf
Capabilities:
Create process on windows

Disassembly:
push ecx
push ecx
push esi
push edi
push 0x45
push 0x8820
xor esi, esi
call fcn.00401286
mov edi, eax
test edi, edi
je 0x40727a
push ebx
lea ebx, [edi + 0x208]
lea eax, [ebx + 0x208]
push ebp
lea ebp, [eax + 0x208]
mov dword [esp + 0x14], eax
lea eax, [ebp + 0x8000]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], esi
je 0x407214
push 0x104
push ebx
push dword [esp + 0x28]
call fcn.00407bb6
jmp 0x407216
mov ebx, esi
push 0x104
push dword [esp + 0x18]
push dword [esp + 0x2c]
call fcn.00407bb6
cmp dword [esp + 0x28], esi
je 0x40723f
push 0x4000
push ebp
push dword [esp + 0x30]
call fcn.00407bb6
jmp 0x407241
mov ebp, esi
cmp dword [esp + 0x2c], esi
je 0x40725f
push 0x104
push dword [esp + 0x14]
push dword [esp + 0x34]
call fcn.00407bb6
mov eax, dword [esp + 0x10]
jmp 0x407261
mov eax, esi
push dword [esp + 0x30]
push eax
push ebp
push dword [esp + 0x20]
push ebx
push dword [esp + 0x30]
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
pop ebp
mov esi, eax
pop ebx
push edi
call fcn.00404070
pop edi
mov eax, esi
pop esi
pop ecx
pop ecx
ret 0x18
Function at 0x408313
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x5c
push edi
push 0x13
or eax, 0xffffffff
push 0x18000
mov dword [esp + 0xc], eax
call fcn.00401286
mov edi, eax
test edi, edi
je 0x408437
push ebx
mov ebx, dword [esp + 0x68]
push ebp
push esi
push 1
push ebx
lea esi, [edi + 0x10000]
call fcn.00406666
mov ebp, eax
cmp byte [ebp], 0
jne 0x408365
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x5c
push 0x2f
push esi
call fcn.004021b6
jmp 0x408383
sub eax, ebx
inc eax
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x5c
push 0x2f
push esi
call fcn.004021b6
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x8000
push edi
push esi
call fcn.00407bb6
push 0x44
pop ebx
push ebx
mov esi, eax
xor ebp, ebp
lea eax, [esp + 0x2c]
push ebp
push eax
call sub.ntdll.dll_memset
mov ax, word [esp + 0x80]
mov dword [esp + 0x34], ebx
xor ebx, ebx
push 0x10
mov word [esp + 0x68], ax
inc ebx
lea eax, [esp + 0x28]
mov dword [esp + 0x64], ebx
push ebp
push eax
call sub.ntdll.dll_memset
add esp, 0x18
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x408434
push dword [esp + 0x78]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push ebp
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x408422
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x10]
test eax, eax
push 0xffffffffffffffff
pop eax
cmove ecx, eax
mov dword [esp + 0x10], ecx
push dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x1c]
call esi
pop esi
pop ebp
pop ebx
push edi
call fcn.00404070
mov eax, dword [esp + 4]
pop edi
add esp, 0x5c
ret 0xc
Function at 0x408448
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push ebx
push edi
push 0x13
push 0x18000
xor edi, edi
call fcn.00401286
mov ebx, eax
test ebx, ebx
je 0x40852c
push ebp
mov ebp, dword [esp + 0x64]
push esi
push 1
push ebp
lea esi, [ebx + 0x10000]
call fcn.00406666
mov dword [esp + 0x68], eax
cmp byte [eax], 0
jne 0x408496
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x5c
push 0x2f
push esi
call fcn.004021b6
jmp 0x4084b7
sub eax, ebp
inc eax
push eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x5c
push 0x2f
push esi
call fcn.004021b6
push dword [esp + 0x68]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x8000
push ebx
push esi
call fcn.00407bb6
push 0x44
pop ebp
push ebp
mov esi, eax
lea eax, [esp + 0x24]
push edi
push eax
call sub.ntdll.dll_memset
mov ax, word [esp + 0x78]
push 0x10
mov word [esp + 0x60], ax
lea eax, [esp + 0x20]
push edi
push eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x64], 1
call sub.ntdll.dll_memset
add esp, 0x18
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
test edi, edi
je 0x40852a
push dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x14]
call esi
pop esi
pop ebp
push ebx
call fcn.00404070
mov eax, edi
pop edi
pop ebx
add esp, 0x54
ret 8

Function at 0x40a2d0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0x1c]
test ebp, ebp
je 0x40a3af
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
push ebx
mov ebx, dword [esp + 0x14]
add edx, 2
push esi
lea ecx, [eax + 2]
mov dword [esp + 0xc], edx
push edi
lea esi, [ebx + 1]
mov dword [esp + 0x20], ecx
sub ebx, eax
mov dword [esp + 0x28], esi
mov eax, 0xff
movzx esi, byte [esi + 2]
mov edi, eax
movzx eax, byte [ebx + ecx - 2]
sub edi, esi
movzx ecx, byte [edx - 2]
imul eax, esi
imul ecx, edi
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x20]
mov byte [ecx - 2], al
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
movzx eax, byte [eax - 1]
movzx ecx, byte [ecx]
imul ecx, esi
imul eax, edi
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x20]
mov byte [ecx - 1], al
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
movzx eax, byte [eax + 1]
movzx ecx, byte [ecx]
imul eax, esi
imul ecx, edi
mov esi, dword [esp + 0x28]
add esi, 4
mov dword [esp + 0x28], esi
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
add edx, dword [esp + 0x24]
mov dword [esp + 0x10], edx
mov byte [ecx], al
mov eax, 0xff
mov byte [ecx + 1], 0
add ecx, 4
mov dword [esp + 0x20], ecx
sub ebp, 1
jne 0x40a309
pop edi
pop esi
pop ebx
pop ebp
pop ecx
ret 0x14
Function at 0x40bd7b
Capabilities:
Get file size

Disassembly:
sub esp, 0x2c
lea eax, [esp + 0xc]
push edi
push eax
lea eax, [esp + 8]
xor edi, edi
push eax
push dword [esp + 0x3c]
call fcn.0040c68d
cmp eax, 0xc8
jne 0x40be0e
push ebx
push dword [esp + 0x3c]
call fcn.00403edb
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40be0d
push ebp
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea eax, [esp + 0x14]
push eax
push edi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
lea eax, [esp + 0x1c]
push eax
call fcn.0040674f
mov ebp, eax
lea eax, [esp + 0x2c]
push eax
call fcn.0040674f
sub ebp, eax
cmp esi, dword [esp + 0x10]
jne 0x40be02
mov eax, ebp
neg eax
test ebp, ebp
cmovns eax, ebp
cmp eax, 1
jle 0x40be05
xor edi, edi
inc edi
push ebx
call fcn.00403e76
pop esi
pop ebp
pop ebx
mov eax, edi
pop edi
add esp, 0x2c
ret 8

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

Disassembly:
sub esp, 0x18
push ebp
push esi
push edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebp, eax
push esi
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call fcn.0040ca9d
mov edi, eax
test edi, edi
jg 0x40c217
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, 0x1388
jb 0x40c1de
cmp edi, 0xc
jl 0x40c22f
push dword [esp + 0x2c]
call fcn.004067d5
xor ecx, ecx
inc ecx
cmp eax, dword [esp + 0x34]
cmove esi, ecx
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0x18
ret 0x10

Function at 0x40c308
Capabilities:
Resolve dns

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40c34e
push 0x2e
push dword [esp + 0xc]
call fcn.00406e26
test eax, eax
jns 0x40c339
push dword [esp + 8]
call fcn.0040c4df
mov esi, eax
cmp esi, 0xffffffff
jne 0x40c34e
push dword [esp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40c34e
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov esi, dword [eax]
mov eax, esi
pop esi
ret 4

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
push 0x10
pop esi
push esi
lea eax, [ebp - 0x14]
push 0
push eax
call sub.ntdll.dll_memset
add esp, 0xc
mov dword [ebp - 4], esi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x1c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
test edi, edi
jle 0x40cb00
cmp dword [ebp + 0x14], 0
je 0x40caeb
push dword [ebp - 0x10]
push dword [ebp + 0x14]
call fcn.0040c84d
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x40cb00
push dword [ebp - 0x12]
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
mov dword [esi], eax
mov eax, edi
pop edi
pop esi
leave
ret 0x18
Function at 0x40cb08
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [ebp + 0x14], 0
jne 0x40cb48
push 0xffffffffffffffff
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0xc], eax
push dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0040ceb1
push 0x10
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x1c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_sendto]
leave
ret 0x18
push dword [ebp + 0x14]
call fcn.0040c308
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x40cb1f
or eax, eax
jmp 0x40cb44

Function at 0x40cb5c
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
jmp 0x40cb8c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40cba8
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, dword [ebp + 0x14]
jae 0x40cba3
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40cb6a
jmp 0x40cbab
or eax, 0xffffffff
jmp 0x40cbab
push 0xfffffffffffffffe
pop eax
pop ebx
pop ebp
ret 0x10

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

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x14]
xor esi, esi
test edi, edi
jle 0x40cbfa
push ebx
mov ebx, dword [esp + 0x14]
push 0
push edi
lea eax, [esi + ebx]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x40cbdc
add esi, eax
sub edi, eax
jmp 0x40cbf1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40cbf7
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
test edi, edi
jg 0x40cbc1
jmp 0x40cbf9
xor esi, esi
pop ebx
pop edi
mov eax, esi
pop esi
ret 0xc

Function at 0x40ce9a
Capabilities:
Set socket configuration

Disassembly:
lea eax, [esp + 8]
push eax
push 0x8004667e
push dword [esp + 0xc]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
ret 8

Function at 0x40cee2
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x40cf29
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040c308
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0040ceb1
cmp dword [ebp - 0xc], 0xffffffff
je 0x40cf29
push 0x10
lea eax, [ebp - 0x10]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40cf32
push esi
call fcn.0040cff8
or esi, 0xffffffff
mov eax, esi
pop esi
leave
ret 8
Function at 0x40d008
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push ebx
push esi
push edi
xor esi, esi
lea edi, [ebp - 0x190]
cmp dword [ebp + 8], esi
mov ebx, 0x202
cmovne edi, dword [ebp + 8]
push edi
push ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x40d03f
cmp word [edi], bx
je 0x40d051
call dword [sym.imp.WS2_32.dll_WSACleanup]
push esi
push 0x20
push esi
call fcn.00403447
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
xor esi, esi
inc esi
jmp 0x40d048

Function at 0x40d05c
Capabilities:
Create udp socket

Disassembly:
push esi
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d0a2
cmp dword [esp + 0xc], 0
je 0x40d0ab
push dword [esp + 0xc]
push dword [esp + 0xc]
push esi
call fcn.0040ca75
cmp eax, 0xffffffff
jne 0x40d0ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [esp + 0x10]
push str.MyBind_Port_d__Err_d
call fcn.004067fd
add esp, 0xc
push esi
call fcn.0040cff8
or esi, 0xffffffff
mov eax, esi
pop esi
ret 8
Function at 0x40dcd0
Capabilities:
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
xor edx, edx
test esi, esi
jle 0x40dd51
push edi
mov edi, dword [0x4316e8]
test edi, edi
je 0x40dd50
mov eax, dword [0x4316e4]
push ebx
test eax, eax
jne 0x40dd32
mov ebx, edx
push ebp
mov esi, dword [esp + 0x18]
mov ebp, edx
movzx eax, bl
mov dword [esp + 0x10], eax
mov dl, byte [ebx + esi]
mov eax, dword [esp + 0x20]
mov ecx, ebp
shl ecx, 3
shr eax, cl
movzx eax, al
shl eax, 8
add eax, dword [esp + 0x10]
xor dl, byte [eax + edi]
inc ebp
mov byte [ebx + esi], dl
cmp ebp, 4
jl 0x40dd04
inc ebx
push 0
pop edx
cmp ebx, dword [esp + 0x1c]
jl 0x40dcf4
pop ebp
jmp 0x40dd4c
cmp eax, dword [esp + 0x1c]
jne 0x40dd4f
mov ebx, dword [esp + 0x14]
movzx eax, dl
lea ecx, [edx + ebx]
mov al, byte [eax + edi]
xor byte [ecx], al
inc edx
cmp edx, esi
jl 0x40dd3c
xor edx, edx
inc edx
pop ebx
pop edi
mov eax, edx
pop esi
pop ecx
ret 0xc

Function at 0x40df37
Capabilities:
Terminate thread

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
xor esi, esi
cmp dword [edi + 0x24], esi
je 0x40dff3
push dword [edi + 0xa8]
mov dword [edi + 0x24], esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x2710
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40df81
push str.Wait_For_Finish_CommThread_Timeout
call fcn.004067fd
pop ecx
push esi
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push 6
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_EscapeCommFunction]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40dfa5
call esi
push eax
push str.EscapeCommFunction_CLRDTR__Error_d
call fcn.004067fd
pop ecx
pop ecx
lea eax, [edi + 0x48]
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x40dfc5
call esi
push eax
push str.SetCommTimeouts_Restoration_to_original__Error_d
call fcn.004067fd
pop ecx
pop ecx
push 0xf
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_PurgeComm]
test eax, eax
jne 0x40dfe3
call esi
push eax
push str.PurgeComm___Error_d
call fcn.004067fd
pop ecx
pop ecx
push dword [edi + 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [edi + 0xc]
call esi
pop edi
pop esi
ret 4
Function at 0x40e0fd
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp dword [esi + 0x24], ebx
jne 0x40e1e6
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov dword [esi + 4], eax
movzx eax, byte [esi + 0x40]
push eax
mov dword [esi], edi
call fcn.0040e8b5
mov ecx, eax
mov dword [esi + 8], ecx
cmp ecx, 0xffffffff
jne 0x40e164
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
movzx eax, byte [esi + 0x40]
push eax
lea eax, [ebp - 0x80]
push str.COM_d_device_not_ready_or_busy__Error_d_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x80]
push ebx
push eax
push edi
call fcn.004033e5
jmp 0x40e1e5
lea eax, [esi + 0x48]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40e188
call edi
push eax
push str.GetCommTimeouts___Error_d
call fcn.004067fd
pop ecx
pop ecx
push esi
call fcn.0040e2e8
mov eax, 0x400
push eax
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetupComm]
push 5
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_EscapeCommFunction]
test eax, eax
jne 0x40e1bc
call edi
push eax
push str.EscapeCommFunction_SETDTR__Error_d
call fcn.004067fd
pop ecx
pop ecx
push dword [esi + 0xa8]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp + 8]
push eax
push ebx
push esi
push 0x40e437
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0xc], eax
mov dword [esi + 0x24], 1
pop edi
mov eax, dword [esi + 0x24]
pop esi
pop ebx
leave
ret 0xc