joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45b490
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov esi, ecx
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x45b5b2
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.0045ac5c
xor eax, eax
push ebp
push 0x45b595
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
jne 0x45b4e0
call fcn.00403d54
jmp 0x45b59c
push 0
push esi
push ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.wsock32.dll_send
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x45b57f
call sub.wsock32.dll_WSAGetLastError
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0x2733
je 0x45b57f
lea eax, [ebp - 0xc]
push eax
mov cl, 1
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov si, 0xfffe
call fcn.004036d8
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 8]
cmp dword [ebp - 0xc], 0
je 0x45b57f
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0xc]
call fcn.0040a92c
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0xb
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0
mov eax, 0x45b5cc
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0xb
lea eax, [ebp - 0x24]
push eax
push 2
mov ecx, dword [0x45fff4]
mov dl, 1
mov eax, dword [0x45a020]
call fcn.0040b278
call fcn.00403ca8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45b59c
mov eax, dword [ebp - 4]
call fcn.0045ac68
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45b5b9
lea eax, [ebp - 0x28]
call fcn.00404248
ret
Function at 0x45b618
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov ebx, ecx
mov esi, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x45b762
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.0045ac5c
xor eax, eax
push ebp
push 0x45b745
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
cmp ebx, 0xffffffff
jne 0x45b67d
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
je 0x45b67d
lea eax, [ebp - 8]
push eax
push 0x4004667f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.wsock32.dll_ioctlsocket
jmp 0x45b72f
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0
jne 0x45b690
call fcn.00403d54
jmp 0x45b74c
push 0
push ebx
push esi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.wsock32.dll_recv
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x45b72f
call sub.wsock32.dll_WSAGetLastError
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0x2733
je 0x45b72f
lea eax, [ebp - 0xc]
push eax
mov cl, 2
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov si, 0xfffe
call fcn.004036d8
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 8]
cmp dword [ebp - 0xc], 0
je 0x45b72f
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0xc]
call fcn.0040a92c
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0xb
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0
mov eax, 0x45b77c
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0xb
lea eax, [ebp - 0x24]
push eax
push 2
mov ecx, dword [0x45fff4]
mov dl, 1
mov eax, dword [0x45a020]
call fcn.0040b278
call fcn.00403ca8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45b74c
mov eax, dword [ebp - 4]
call fcn.0045ac68
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45b769
lea eax, [ebp - 0x28]
call fcn.00404248
ret
Function at 0x48f9e0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x7c000]
push edi
jmp 0x48f9fa
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x48fa01
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x48f9f0
mov eax, 1
add ebx, ebx
jne 0x48fa13
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x48fa24
jne 0x48fa43
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x48fa43
dec eax
add ebx, ebx
jne 0x48fa30
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x48fa08
add ebx, ebx
jne 0x48fa3f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x48fa95
xor ecx, ecx
sub eax, 3
jb 0x48fa5b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x48faca
sar eax, 1
mov ebp, eax
jmp 0x48fa66
add ebx, ebx
jne 0x48fa66
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x48fa34
inc ecx
add ebx, ebx
jne 0x48fa74
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x48fa34
add ebx, ebx
jne 0x48fa81
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x48fa76
jne 0x48fa92
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x48fa76
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x48fab4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x48faa6
jmp 0x48f9f6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x48fab4
add edi, ecx
jmp 0x48f9f6
pop esi
mov edi, esi
mov ecx, 0x1a9e
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x48fad2
cmp byte [edi], 6
jne 0x48fad2
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x48fad7
lea edi, [esi + 0x8d000]
mov eax, dword [edi]
or eax, eax
je 0x48fb4f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x8f000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x8f104]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x48fb04
mov ecx, edi
jns 0x48fb33
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x8f108]
or eax, eax
je 0x48fb49
mov dword [ebx], eax
add ebx, 4
jmp 0x48fb21
call dword [esi + 0x8f118]
mov ebp, dword [esi + 0x8f10c]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x207]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x48fb83
sub esp, 0xffffff80
jmp section.UPX0

Function at 0x401119
Capabilities:
Encode data using xor

Disassembly:
push 1
pop ecx
cmp dword [esp + 8], ecx
jl 0x401139
mov eax, dword [esp + 4]
mov edx, ecx
and edx, 3
mov dl, byte [esp + edx + 0xc]
xor byte [eax], dl
inc ecx
inc eax
cmp ecx, dword [esp + 8]
jle 0x401126
ret
Function at 0x40b32f
Capabilities:
Copy file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x500
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileA]
push edi
push 0
push ebx
push dword [ebp + 8]
call esi
test eax, eax
je 0x40b35e
push dword [ebp + 8]
call fcn.00409e3a
pop ecx
jmp 0x40b4f5
lea eax, [ebp - 0x300]
push ebx
push eax
call fcn.0040b4fa
pop ecx
lea eax, [ebp - 0x300]
pop ecx
push 0
push eax
push dword [ebp + 8]
call esi
test eax, eax
jne 0x40b382
push ebx
jmp 0x40b353
push 1
pop edi
push dword [ebp + 8]
mov dword [0x4136f4], edi
call fcn.00409e3a
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop ecx
lea eax, [ebp - 0x300]
push eax
lea eax, [ebp - 0x200]
push eax
call esi
lea eax, [ebp - 0x100]
push ebx
push eax
call esi
xor esi, esi
lea eax, [ebp - 0x200]
push esi
push eax
call fcn.0040a794
lea eax, [ebp - 0x100]
push esi
push eax
call fcn.0040a794
mov eax, dword [0x4136b0]
add esp, 0x10
cmp eax, 2
jne 0x40b400
lea eax, [ebp - 0x200]
push str.WININIT.INI
push eax
lea eax, [ebp - 0x100]
push eax
push str.rename
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
jmp 0x40b4f5
cmp eax, edi
jne 0x40b421
push 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push ebx
call esi
push 4
lea eax, [ebp - 0x200]
push ebx
push eax
call esi
jmp 0x40b4f5
lea eax, [ebp - 0x100]
push eax
call fcn.0040b53f
push eax
lea eax, [ebp - 0x200]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x500]
push str.del__s_r_nrename__s__s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [ebp - 0x100]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x101], 0x5c
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x40b48e
lea eax, [ebp - 0x100]
push 0x4120e0
push eax
call ebx
lea eax, [ebp - 0x100]
push 0x41275c
push eax
call ebx
lea eax, [ebp - 0x100]
push edi
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40b4c3
lea eax, [ebp - 0x100]
push esi
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov edi, eax
jmp 0x40b4cd
push 2
push esi
push edi
call dword [sym.imp.KERNEL32.dll__llseek]
cmp edi, 0xffffffff
je 0x40b4f5
lea eax, [ebp - 0x500]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x500]
push eax
push edi
call dword [sym.imp.KERNEL32.dll__lwrite]
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ea25
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x413348
cmp edx, dword [eax]
je 0x40ea47
add eax, 8
inc ecx
cmp eax, 0x4133d8
jl 0x40ea38
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x413348]
jne 0x40eb75
mov eax, dword [0x4134e0]
cmp eax, 1
je 0x40eb4f
test eax, eax
jne 0x40ea78
cmp dword [0x413134], 1
je 0x40eb4f
cmp edx, 0xfc
je 0x40eb75
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40eaaf
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040cb80
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0040f2e0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40eaf2
lea eax, [ebp - 0x1a4]
push eax
call fcn.0040f2e0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4125cc
push edi
call fcn.0040c180
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040cb80
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040cb90
lea eax, [ebp - 0xa0]
push 0x410ad4
push eax
call fcn.0040cb90
push dword [esi + 0x41334c]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040cb90
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040f695
add esp, 0x2c
pop edi
jmp 0x40eb75
lea eax, [ebp + 8]
lea esi, [esi + 0x41334c]
push 0
push eax
push dword [esi]
call fcn.0040f2e0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401340
Capabilities:
Terminate process

Disassembly:
push edi
mov edi, dword [esp + 8]
test edi, edi
je 0x4013aa
push ebx
push esi
lea eax, [esp + 0x10]
push eax
push edi
call fcn.0041c6d0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40136e
push str.___G:_s90_cns_cns_main.c___GENERAL___269___Error_text_cannot_be_determined
call sym.cns.exe_gen__nls_nlst
add esp, 4
mov ebx, eax
push edi
call fcn.0041ca50
mov esi, eax
add esp, 4
test esi, esi
jne 0x401382
mov esi, 0x4aaf50
call fcn.0041c8f0
mov ecx, dword [esp + 0x10]
push esi
push ebx
push edi
push ecx
push str._s____d____s_n_s_n
push 0x4793a4
call fcn.0041b0a0
add esp, 0x18
push 1
call fcn.0046393d
pop esi
pop ebx
pop edi
ret

Function at 0x4158d0
Capabilities:
Get hostname

Disassembly:
push ebx
mov ebx, dword [esp + 8]
cmp ebx, 0x3e8
push esi
jbe 0x4158e2
mov esi, ebx
jmp 0x4158f8
mov al, byte [0x482681]
test al, al
mov esi, 0x4ae464
je 0x4158f8
push 0x64
push esi
call sub.WS2_32.dll_gethostname
push edi
push 0x482800
call fcn.0040bb40
add esp, 4
test eax, eax
je 0x415943
push 0x482808
call fcn.0040bb40
or ecx, 0xffffffff
mov edi, eax
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x200
jle 0x415943
mov eax, dword [str.gns_fwutil.c]
push 0xf8
push eax
push str._int_STRLEN__gns__ver_get_root____hosts_______int___int___int_sizeof_path__1__
call fcn.0041cad0
add esp, 0xc
push 0x200
push str._hosts
call fcn.0040bb40
add esp, 4
push eax
push 0x4aec40
call fcn.00419840
mov ecx, 0x4aec40
add esp, 0xc
test ecx, ecx
je 0x41597a
mov edi, ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x41597c
xor ecx, ecx
mov edx, 0x482868
neg edx
sbb edx, edx
mov eax, 0x200
neg edx
sub eax, ecx
cmp edx, eax
jle 0x4159ab
mov ecx, dword [str.gns_fwutil.c]
push 0xf9
push ecx
push str._int_STRLEN_________int____int_sizeof_path__1________len_
call fcn.0041cad0
add esp, 0xc
push 0x200
push 0x4828a8
push 0x4aec40
call fcn.004198d0
mov edx, 0x4aec40
add esp, 0xc
test edx, edx
je 0x4159db
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edx, ecx
jmp 0x4159dd
xor edx, edx
test esi, esi
je 0x4159ef
or ecx, 0xffffffff
xor eax, eax
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x4159f1
xor ecx, ecx
mov eax, 0x200
sub eax, edx
cmp ecx, eax
pop edi
jle 0x415a16
mov ecx, dword [str.gns_fwutil.c]
push 0xfa
push ecx
push str._int_STRLEN_host_name_____int____int_sizeof_path__1________len_
call fcn.0041cad0
add esp, 0xc
push 0x200
push esi
push 0x4aec40
call fcn.004198d0
add esp, 0xc
pop esi
cmp ebx, 0x3e8
pop ebx
ja 0x415a6c
mov al, byte [0x482681]
test al, al
je 0x415a65
push 0
push 0x4aec40
call fcn.0042f260
add esp, 8
test eax, eax
je 0x415a65
push 0
push 0
push 0x1fd
push 0x4aec40
call fcn.0041ee00
add esp, 0x10
mov byte [0x482681], 0
mov eax, 0x4aec40
ret
Function at 0x4205e0
Capabilities:
Create tcp socket
Create udp socket
Get hostname

Disassembly:
sub esp, 0x74
push ebx
push ebp
push esi
push edi
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov edi, eax
test edi, edi
jge 0x420633
mov eax, dword [str.gen_com.c]
push 0x108
push eax
push str.ms_0
call fcn.0041cad0
mov ecx, dword [str.gen_com.c]
push 0x108
push ecx
push 0x488888
call fcn.0041cb50
add esp, 0x18
pop edi
pop esi
pop ebp
mov eax, 0x138b
pop ebx
add esp, 0x74
ret
push 0x64
lea edx, [esp + 0x24]
push edx
call sub.WS2_32.dll_gethostname
test eax, eax
jge 0x42067e
mov eax, dword [str.gen_com.c]
push 0x10c
push eax
push str.status___0
call fcn.0041cad0
mov ecx, dword [str.gen_com.c]
push 0x10c
push ecx
push 0x48889c
call fcn.0041cb50
add esp, 0x18
pop edi
pop esi
pop ebp
mov eax, 0x1394
pop ebx
add esp, 0x74
ret
lea edx, [esp + 0x20]
push edx
call fcn.00420b70
add esp, 4
test eax, eax
jne 0x4206c4
lea eax, [esp + 0x20]
push eax
push str.Hostname:__s
push 0x1394
call fcn.0041c900
mov ecx, dword [str.gen_com.c]
push 0x111
push ecx
call fcn.0041cc10
add esp, 0x14
pop edi
pop esi
pop ebp
mov eax, 0x1394
pop ebx
add esp, 0x74
ret
push eax
mov word [esp + 0x14], 2
call sub.WS2_32.dll_inet_addr
mov ebx, dword [esp + 0x88]
xor ecx, ecx
xor edx, edx
mov cl, bh
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
push 0x10
mov eax, ebx
lea edx, [esp + 0x14]
shl eax, 8
push edx
add eax, ecx
push edi
mov word [esp + 0x1e], ax
call sub.WS2_32.dll_bind
mov esi, eax
test esi, esi
je 0x42074b
mov ebp, dword [esp + 0x8c]
push ebx
push str.___G:_s90_gen_gen_com.c___GENERAL___285___Port__d_is_busy_n
push str.BACKGROUND
call fcn.0041b0a0
add esp, 0xc
inc ebx
cmp ebx, ebp
jge 0x420788
xor ecx, ecx
mov cl, bh
push 0x10
mov eax, ebx
lea edx, [esp + 0x14]
shl eax, 8
push edx
push edi
add eax, ecx
mov word [esp + 0x1e], ax
call sub.WS2_32.dll_bind
mov esi, eax
test esi, esi
jne 0x420710
push 5
push edi
call sub.WS2_32.dll_listen
mov eax, dword [esp + 0x12]
mov ecx, dword [esp + 0x94]
and eax, 0xffff
mov edx, eax
shr edx, 8
shl eax, 8
add edx, eax
mov eax, dword [esp + 0x90]
and edx, 0xffff
mov dword [eax], edx
mov dword [ecx], edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x74
ret
test esi, esi
je 0x42074b
mov eax, dword [str.gen_com.c]
push 0x120
push eax
push 0x488904
call fcn.0041cad0
mov ecx, dword [str.gen_com.c]
push 0x120
push ecx
push str.bind
call fcn.0041cb50
add esp, 0x18
pop edi
pop esi
pop ebp
mov eax, 0x138c
pop ebx
add esp, 0x74
ret
Function at 0x4207d0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
push ebp
push esi
mov esi, dword [esp + 0x24]
mov dword [esp + 8], 0x10
mov dword [esp + 0xc], 1
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x14]
push ecx
push esi
call sub.WS2_32.dll_accept
mov ebp, eax
test ebp, ebp
jge 0x420836
mov eax, dword [0x4d9f94]
cmp eax, 4
je 0x4207e9
cmp eax, 0xb
je 0x4207e9
test ebp, ebp
jge 0x420836
mov edx, dword [str.gen_com.c]
push 0x15b
push edx
push str.accept
call fcn.0041cb50
add esp, 0xc
pop esi
mov eax, 0x138f
pop ebp
add esp, 0x18
ret
push ebx
push 2
push 4
lea eax, [esp + 0x20]
push eax
call sub.WS2_32.dll_gethostbyaddr
mov ebx, eax
test ebx, ebx
je 0x42088f
push edi
mov edi, dword [ebx]
test edi, edi
je 0x42085e
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x420860
xor ecx, ecx
mov edx, dword [esp + 0x38]
lea esi, [edx - 1]
cmp ecx, esi
pop edi
jle 0x420884
mov eax, dword [str.gen_com.c]
push 0x161
push eax
push str._int_STRLEN_host_ent__h_name____int__hostname_len_1_
call fcn.0041cad0
add esp, 0xc
mov ecx, dword [ebx]
mov edx, dword [esp + 0x30]
push esi
push ecx
push edx
jmp 0x4208ca
mov eax, dword [esp + 0x34]
mov ecx, 0x488958
neg ecx
sbb ecx, ecx
lea esi, [eax - 1]
and ecx, 7
cmp ecx, esi
jle 0x4208bf
mov edx, dword [str.gen_com.c]
push 0x163
push edx
push str._int_STRLEN__Unknown_____int__hostname_len_1_
call fcn.0041cad0
add esp, 0xc
mov eax, dword [esp + 0x30]
push esi
push str.Unknown
push eax
call fcn.00419840
add esp, 0xc
push 4
lea ecx, [esp + 0x14]
push ecx
push 8
push 0xffff
push ebp
call sub.WS2_32.dll_setsockopt
test eax, eax
pop ebx
je 0x420924
mov edx, dword [str.gen_com.c]
push 0x16d
push edx
push 0x488998
call fcn.0041cad0
mov eax, dword [str.gen_com.c]
push 0x16d
push eax
push str.setsockopt
call fcn.0041cb50
add esp, 0x18
pop esi
mov eax, 0x138b
pop ebp
add esp, 0x18
ret
mov ecx, dword [esp + 0x28]
pop esi
mov dword [ecx], ebp
xor eax, eax
pop ebp
add esp, 0x18
ret
Function at 0x420940
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
sub esp, 0x114
push ebx
push ebp
push esi
mov esi, dword [esp + 0x128]
xor ebx, ebx
cmp esi, ebx
push edi
mov dword [esp + 0x10], ebx
jge 0x420983
mov eax, dword [str.gen_com.c]
push 0x218
push eax
push str.num_retries__0
call fcn.0041cad0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x1389
pop ebx
add esp, 0x114
ret
cmp dword [esp + 0x128], ebx
jge 0x4209b5
mov ecx, dword [str.gen_com.c]
push 0x219
push ecx
push str.timeout__0
call fcn.0041cad0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x1389
pop ebx
add esp, 0x114
ret
mov edi, dword [esp + 0x130]
cmp edi, 0x3e8
ja 0x4209ed
mov edx, dword [str.gen_com.c]
push 0x21a
push edx
push 0x4889cc
call fcn.0041cad0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x1389
pop ebx
add esp, 0x114
ret
cmp dword [esp + 0x138], 0x3e8
ja 0x420a22
mov eax, dword [str.gen_com.c]
push 0x21b
push eax
push 0x4889dc
call fcn.0041cad0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x1389
pop ebx
add esp, 0x114
ret
push edi
call fcn.00420b40
add esp, 4
test al, al
jne 0x420a62
push edi
call fcn.00420b70
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x420a62
mov ecx, dword [str.gen_com.c]
push 0x220
push ecx
call fcn.0041cc10
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1389
pop ebx
add esp, 0x114
ret
cmp esi, ebx
jle 0x420add
mov eax, dword [esp + 0x134]
mov edx, eax
shl edx, 8
xor ecx, ecx
mov cl, ah
lea ebp, [edx + ecx]
push 0
push 1
push 2
call sub.WS2_32.dll_socket
push edi
mov esi, eax
mov word [esp + 0x18], 2
mov word [esp + 0x1a], bp
call sub.WS2_32.dll_inet_addr
mov dword [esp + 0x18], eax
push 0x10
lea eax, [esp + 0x18]
xor edx, edx
push eax
mov dword [esp + 0x24], edx
push esi
mov dword [esp + 0x2c], edx
call sub.WS2_32.dll_connect
test eax, eax
je 0x420ad4
call sub.WS2_32.dll_WSAGetLastError
push esi
mov dword [esp + 0x14], eax
call sub.WS2_32.dll_closesocket
mov eax, dword [esp + 0x12c]
inc ebx
cmp ebx, eax
jl 0x420a79
jmp 0x420add
cmp ebx, dword [esp + 0x12c]
jl 0x420b28
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x28]
push str.Windows_Socket_Error_Code__d
push edx
call fcn.00463a12
lea ecx, [esp + 0x30]
add esp, 0xc
test ecx, ecx
lea eax, [esp + 0x24]
jne 0x420b05
mov eax, str.Unknown_error
push eax
push str.___G:_s90_gen_gen_com.c___GENERAL___581___connect:_s
push 0x1391
call fcn.0041c900
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x1391
pop ebx
add esp, 0x114
ret
mov edx, dword [esp + 0x138]
pop edi
mov dword [edx], esi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret
Function at 0x420b70
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x420b7f
ret
cmp word [eax + 0xa], 4
je 0x420ba2
mov ecx, dword [str.gen_com.c]
push 0x2bb
push ecx
push str.hostent__h_length__4
call fcn.0041cad0
add esp, 0xc
xor eax, eax
ret
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
xor ecx, ecx
mov cl, byte [eax + 3]
xor edx, edx
mov dl, byte [eax + 2]
push ecx
xor ecx, ecx
mov cl, byte [eax + 1]
push edx
xor edx, edx
mov dl, byte [eax]
push ecx
push edx
push str._u._u._u._u
push 0x4c2030
call fcn.00463a12
add esp, 0x18
mov eax, 0x4c2030
ret

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

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
xor esi, esi
test edi, edi
jle 0x420ced
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
mov eax, edi
sub eax, esi
push eax
lea ecx, [esi + ebx]
push ecx
push ebp
call sub.WS2_32.dll_send
test eax, eax
jge 0x420ce7
mov eax, dword [0x4d9f94]
cmp eax, 4
jne 0x420cf4
jmp 0x420ce9
add esi, eax
cmp esi, edi
jl 0x420cc6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
cmp eax, 0x20
jne 0x420d03
pop edi
pop esi
pop ebp
mov eax, 0x1392
pop ebx
ret
mov edx, dword [str.gen_com.c]
push 0x35c
push edx
push str.write
call fcn.0041cb50
mov edi, dword [0x4d9f94]
add esp, 0xc
xor eax, eax
cmp edi, 0xb
setne al
pop edi
pop esi
pop ebp
pop ebx
dec eax
and eax, 3
add eax, 0x1390
ret