joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10039740
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x288
mov eax, dword [0x100dcbc0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x234]
push 0x1a6
push eax
mov dword [0x100dcb84], 0x927c0
call fcn.1002f500
add esp, 8
cmp dword [eax + 0x14], 7
jbe 0x1003977d
mov eax, dword [eax]
push esi
push eax
lea eax, [ebp - 0x21c]
push str._s___s_
push eax
call fcn.1000e620
mov ecx, dword [ebp - 0x220]
add esp, 0x10
cmp ecx, 7
jbe 0x100397d3
mov edx, dword [ebp - 0x234]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x100397c9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1003996f
push ecx
push edx
call fcn.1008c3c5
add esp, 8
push 0x200
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.1008e1a0
lea eax, [ebp - 0x234]
push 0x1a8
push eax
call fcn.1002f500
add esp, 0x14
cmp dword [eax + 0x14], 7
jbe 0x10039802
mov eax, dword [eax]
push 0x100
lea ecx, [ebp - 0x204]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, dword [ebp - 0x220]
cmp ecx, 7
jbe 0x10039855
mov edx, dword [ebp - 0x234]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x1003984b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10039974
push ecx
push edx
call fcn.1008c3c5
add esp, 8
lea ecx, [ebp - 0x244]
mov dword [0x100dcb84], 0x92ba8
push ecx
lea ecx, [ebp - 0x288]
mov dword [ebp - 0x288], 0x44
push ecx
push 0
push 0
xor eax, eax
mov dword [ebp - 0x25c], 1
cmp dword [ebp - 0x208], 7
xorps xmm0, xmm0
push 0
push 0
mov word [ebp - 0x246], ax
mov word [ebp - 0x258], ax
lea eax, [ebp - 0x21c]
cmova eax, dword [ebp - 0x21c]
push 0
push 0
push eax
lea eax, [ebp - 0x204]
movlpd qword [ebp - 0x284], xmm0
push eax
movlpd qword [ebp - 0x27c], xmm0
movlpd qword [ebp - 0x274], xmm0
movlpd qword [ebp - 0x26c], xmm0
movlpd qword [ebp - 0x264], xmm0
movlpd qword [ebp - 0x256], xmm0
movlpd qword [ebp - 0x24e], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push dword [ebp - 0x240]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x100dcb84], 0x92f90
call esi
push dword [ebp - 0x244]
call esi
mov ecx, dword [ebp - 0x208]
mov dword [0x100dcb84], 0x93378
cmp ecx, 7
jbe 0x10039960
mov edx, dword [ebp - 0x21c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10039956
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10039979
push ecx
push edx
call fcn.1008c3c5
add esp, 8
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
call fcn.1009189f
call fcn.1009189f
call fcn.1009189f
int3
Function at 0x10042950
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x100429e6
push esi
call fcn.10052ca0
add esp, 4
test al, al
jne 0x100429e6
push ebx
push edi
mov edi, esi
xor ebx, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x10042975
sub edi, ecx
push edi
push 0x2e
push esi
call fcn.10060610
add esp, 0xc
test eax, eax
je 0x100429a9
sub eax, esi
push eax
push 0x2e
push esi
call fcn.10060610
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x100429ab
inc ebx
mov ecx, esi
sub ecx, ebx
add edi, ecx
test ebx, ebx
cmovne esi, ebx
mov ebx, 0x1505
add edi, esi
cmp esi, edi
jae 0x100429de
nop dword [eax]
mov al, byte [esi]
push eax
call fcn.10051060
movsx ecx, al
inc esi
mov eax, ebx
add esp, 4
shl eax, 5
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp esi, edi
jb 0x100429c0
pop edi
movzx eax, bl
pop ebx
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
ret
Function at 0x1004c950
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x6f9], 0
je 0x1004c9e4
cmp dword [edi + 0x1a8], 0
je 0x1004c9a1
push esi
push 1
push edi
call fcn.1003da60
push dword [edi + 0x14c]
mov eax, dword [edi + 0x1a8]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call eax
push 0
push edi
mov esi, eax
call fcn.1003da60
add esp, 0x24
mov eax, esi
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp + 0xc]
mov ecx, edx
sub ecx, 0
je 0x1004c9b5
sub ecx, 1
je 0x1004c9b5
sub ecx, 1
jne 0x1004c9e4
push dword [edi + 0x148]
lea eax, [edx*2 + 0x100bce88]
push 1
add eax, edx
push 2
push eax
call fcn.1009cbaa
push dword [edi + 0x148]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.1009cbaa
add esp, 0x20
xor eax, eax
pop edi
pop ebp
ret
Function at 0x1004cf20
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x100dcbc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x110], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x10c], eax
xor eax, eax
mov ecx, dword [ebx + 0xc]
push esi
mov esi, 0x178
push edi
mov edx, dword [ecx + 0x154]
cmp dword [ebp + 0xc], edx
sete al
lea eax, [eax*4 + 0x150]
mov eax, dword [eax + ecx]
mov dword [ebp - 0x108], eax
mov eax, 0x188
cmove esi, eax
mov eax, dword [ecx + 0x2a8]
add esi, ecx
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x44], 3
je 0x1004d021
xor eax, eax
cmp dword [ebp + 0xc], edx
sete al
lea eax, [eax*4 + 0x168]
cmp dword [eax + ecx], 0x1004cbb0
jne 0x1004d021
cmp dword [esi], 0
je 0x1004cfb2
test edi, edi
je 0x1004d021
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp - 0x108]
call fcn.1005c790
add esp, 0x14
cmp eax, 0xffffffff
je 0x1004d021
test al, 1
je 0x1004d021
mov ecx, dword [esi]
test ecx, ecx
jne 0x1004d005
mov eax, dword [ebx + 0x4c8]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x100dcb88]
mov ecx, eax
add esp, 4
mov dword [esi], ecx
test ecx, ecx
je 0x1004d058
mov edi, dword [esi + 4]
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov eax, dword [esi + 8]
push 0
push edi
add eax, ecx
push eax
push dword [ebp - 0x108]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x1004d021
add dword [esi + 8], eax
push 0
push dword [ebp + 0x14]
push dword [ebp - 0x110]
push dword [ebp - 0x108]
call dword [sym.imp.WS2_32.dll_send]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
jne 0x1004d0a6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x1004d07a
xor edi, edi
lea eax, [edi + 0x51]
jmp 0x1004d0a6
mov ecx, dword [ebp - 0x10c]
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov dword [ecx], 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
push 0x100
lea eax, [ebp - 0x104]
push eax
push esi
call fcn.10079990
push eax
push str.Send_failure:__s
push ebx
call fcn.1004c9f0
add esp, 0x18
mov dword [ebx + 0x948], esi
mov eax, 0x37
mov ecx, dword [ebp - 0x10c]
mov dword [ecx], edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp byte [eax + 0x1a4], 0
je 0x1004d510
push eax
call fcn.10047260
add esp, 4
test eax, eax
je 0x1004d531
mov al, 1
pop ebp
ret
mov eax, dword [eax + 0x150]
cmp eax, 0xffffffff
je 0x1004d531
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
setne al
pop ebp
ret
xor al, al
pop ebp
ret
Function at 0x1004d790
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x100dcbc0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x184]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
push 0x80
push 0
push eax
mov dword [ebp - 0x188], 0x80
call fcn.1008e1a0
add esp, 0xc
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x184]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1004d80d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
call fcn.10079990
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x1004d850
push edi
push esi
push dword [ebp - 0x188]
lea eax, [ebp - 0x184]
push eax
call fcn.1004d360
add esp, 0x10
test al, al
jne 0x1004d859
call fcn.10091969
mov esi, dword [eax]
call fcn.10091969
mov edi, eax
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
call fcn.10079990
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.1004c9f0
add esp, 0x1c
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret

Function at 0x1004e030
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x100ddce4]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x1004e082
push 3
push 2
push eax
push eax
push 6
call fcn.10079ff0
add esp, 0x14
test al, al
je 0x1004e076
mov dword [0x100ddce4], 2
mov esp, ebp
pop ebp
ret
mov dword [0x100ddce4], 1
jmp 0x1004e087
cmp eax, 2
je 0x1004e0c7
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1004e0ae
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x1004e0c7
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esp, ebp
pop ebp
ret
Function at 0x1004f2b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.100a43b9

Function at 0x1004f530
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push edi
push 0x100bd158
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 4], eax
test eax, eax
jne 0x1004f550
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push esi
push str.LoadLibraryExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [ebp + 8]
mov ebx, eax
push 0x100bd174
push esi
mov dword [ebp - 8], ebx
call fcn.100a0026
add esp, 8
test eax, eax
je 0x1004f59c
test ebx, ebx
je 0x1004f58c
push 8
push 0
push esi
call ebx
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x1004f5c5
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1004f5c5
push 0x800
push 0
push esi
call ebx
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x1004f670
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004f5e1
sub ecx, ebx
lea eax, [ecx + 1]
add eax, edx
push eax
call dword [0x100dcb88]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x1004f666
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1004f666
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004f612
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004f630
sub ecx, edx
sub ecx, esi
add ecx, ebx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x1004f640
mov eax, dword [ebp - 8]
test eax, eax
je 0x1004f65d
push 8
push 0
push ebx
call eax
jmp 0x1004f664
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x100dcb8c]
add esp, 4
pop esi
pop ebx
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x1004f6c0
Capabilities:
Get common file path
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x100dcbc0]
xor eax, ebp
mov dword [ebp - 4], eax
test byte [ebp + 8], 2
je 0x1004f719
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1004f706
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x1004f700
shr eax, 8
cmp al, 2
je 0x1004f719
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
call fcn.1007b0f0
test eax, eax
jne 0x1004f8af
push esi
push edi
push 0x100bd158
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x1004f746
mov dword [0x100ddcec], esi
jmp 0x1004f885
push ebx
push str.LoadLibraryExA
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x100bd174
push str.iphlpapi.dll
mov ebx, eax
call fcn.100a0026
add esp, 8
test eax, eax
je 0x1004f793
test ebx, ebx
je 0x1004f781
push 8
push 0
push str.iphlpapi.dll
call ebx
mov esi, eax
jmp 0x1004f85d
push str.iphlpapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
jmp 0x1004f85d
test ebx, ebx
je 0x1004f7bc
push str.AddDllDirectory
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1004f7bc
push 0x800
push 0
push str.iphlpapi.dll
call ebx
mov esi, eax
jmp 0x1004f85d
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [ebp - 0x198], eax
test eax, eax
je 0x1004f85d
lea ecx, [eax + 0xd]
push ecx
call dword [0x100dcb88]
mov edi, eax
add esp, 4
test edi, edi
je 0x1004f853
push dword [ebp - 0x198]
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1004f853
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004f800
sub ecx, edx
mov eax, 0x5c
mov edx, edi
mov word [ecx + edi], ax
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x1004f817
sub edx, ecx
mov ecx, str.iphlpapi.dll
sub edx, ecx
add edx, edi
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x1004f830
test ebx, ebx
je 0x1004f84a
push 8
push 0
push edi
call ebx
jmp 0x1004f851
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
push edi
call dword [0x100dcb8c]
add esp, 4
mov dword [0x100ddcec], esi
pop ebx
test esi, esi
je 0x1004f885
push str.if_nametoindex
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [0x100ddce8]
test eax, eax
cmovne ecx, eax
mov dword [0x100ddce8], ecx
push 3
push 2
push 0
push 0
push 6
call fcn.10079ff0
add esp, 0x14
test al, al
setne byte [0x100dea68]
push 0x100dea70
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
Function at 0x10052ca0
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x100dcbc0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jg 0x10052ce6
lea eax, [ebp - 0x14]
push eax
push esi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
pop esi
setg al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret

Function at 0x10052e10
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x10052e25
mov eax, dword [eax + 0x70]
mov al, byte [eax + 0xe3]
pop ebp
ret
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x10052e3a
xor al, al
pop ebp
ret
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, 1
pop ebp
ret
Function at 0x10060ca0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
lea eax, [ebp - 0x10]
push edi
push eax
call fcn.10052170
push dword [ebp + 8]
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x10], xmm0
call fcn.100a3e90
push dword [ebp + 0xc]
mov edi, eax
call fcn.100a3e90
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileExA]
add esp, 0xc
mov esi, eax
push 1
push esi
push edi
call ebx
test eax, eax
jne 0x10060d27
lea eax, [ebp - 0x20]
push eax
call fcn.10052170
movups xmm0, xmmword [ebp - 0x10]
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.10052220
add esp, 0x20
test edx, edx
ja 0x10060d4a
jb 0x10060d15
cmp eax, 0x3e8
ja 0x10060d4a
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push esi
push edi
call ebx
test eax, eax
je 0x10060ce0
test edi, edi
je 0x10060d34
push edi
call fcn.10097bf8
add esp, 4
test esi, esi
je 0x10060d41
push esi
call fcn.10097bf8
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x10060d57
push edi
call fcn.10097bf8
add esp, 4
test esi, esi
je 0x10060d64
push esi
call fcn.10097bf8
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10060ea0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration
Start tcp server

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x100dcbc0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 0x14]
push 6
push 1
push 2
mov dword [ebp - 0x28], 0x10
mov dword [ebp - 0x2c], 1
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x10061071
xorps xmm0, xmm0
mov eax, 2
push 0x7f000001
movlpd qword [ebp - 0xc], xmm0
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x10], eax
xor eax, eax
push 4
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x2c]
push eax
push 4
push 0xffff
push esi
mov dword [edi + 4], 0xffffffff
mov dword [edi], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1006105f
push 0x10
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x1006105f
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x1006105f
cmp dword [ebp - 0x28], 0x10
jl 0x1006105f
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x1006105f
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi], eax
cmp eax, 0xffffffff
je 0x1006105f
push 0x10
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1006105f
push 1
push esi
call fcn.10079c60
add esp, 8
test eax, eax
js 0x1006105f
push 0
push 0x2710
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], esi
push 1
push eax
mov dword [ebp - 0x30], 0x300
call fcn.1005c3d0
add esp, 0x10
push 0
push 0
push esi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x1006105f
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x1006105f
cmp dword [ebp - 0x28], 0x10
jl 0x1006105f
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x10
push eax
lea eax, [ebp - 0x24]
push eax
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
je 0x1006105f
cmp dword [ebp - 0x28], 0x10
jl 0x1006105f
mov ax, word [ebp - 0x14]
cmp ax, word [ebp - 0x24]
jne 0x1006105f
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jne 0x1006105f
mov ax, word [ebp - 0x12]
cmp ax, word [ebp - 0x22]
jne 0x1006105f
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
call esi
push dword [edi]
call esi
push dword [edi + 4]
call esi
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
xor ecx, ebp
pop esi
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
Function at 0x100610c0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
push edi
xor edi, edi
mov dword [ebp - 0x10], edi
mov dword [eax], edi
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
test eax, eax
jne 0x10061257
push esi
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x10061243
push ebx
nop dword [eax]
mov eax, dword [esi + 0x14]
test eax, eax
je 0x1006111e
lea edx, [eax + 1]
nop word [eax + eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10061110
sub eax, edx
lea ecx, [eax + 1]
jmp 0x10061120
xor ecx, ecx
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], ecx
cmp eax, 2
jne 0x10061132
mov eax, 0x10
jmp 0x10061140
cmp eax, 0x17
jne 0x100611e5
mov eax, 0x1c
cmp dword [esi + 0x18], 0
mov dword [ebp - 4], eax
je 0x100611e5
mov edx, dword [esi + 0x10]
test edx, edx
je 0x100611e5
cmp edx, eax
jb 0x100611e5
add ecx, 0x20
add eax, ecx
push eax
call dword [0x100dcb88]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10061235
mov ecx, dword [esi]
mov dword [ebx], ecx
mov ecx, dword [esi + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 4]
mov dword [ebx + 0xc], eax
lea eax, [ebx + 0x20]
push ecx
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x18], eax
push dword [esi + 0x18]
push eax
call fcn.1008dc20
mov edx, dword [ebp - 0xc]
add esp, 0xc
test edx, edx
je 0x100611d3
mov eax, dword [ebx + 0x18]
add eax, dword [ebp - 4]
push edx
mov dword [ebx + 0x14], eax
push dword [esi + 0x14]
push eax
call fcn.1008dc20
add esp, 0xc
mov eax, dword [ebp - 0x10]
test edi, edi
cmove edi, ebx
test eax, eax
je 0x100611e2
mov dword [eax + 0x1c], ebx
mov dword [ebp - 0x10], ebx
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x10061100
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
pop ebx
test eax, eax
je 0x10061202
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x1006123f
test edi, edi
je 0x10061226
nop word [eax + eax]
mov esi, dword [edi + 0x1c]
push edi
call dword [0x100dcb8c]
add esp, 4
mov edi, esi
test esi, esi
jne 0x10061210
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0x14]
xor edi, edi
mov dword [eax], edi
mov eax, esi
pop esi
pop edi
mov esp, ebp
pop ebp
ret
mov esi, 8
mov dword [ebp - 8], esi
jmp 0x100611f3
test edi, edi
jne 0x1006124f
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
mov eax, esi
pop esi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x10061450
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x100dcbc0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x18]
push esi
mov esi, dword [ebp + 8]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x10061499
push ebx
push esi
lea eax, [ebp - 0x18]
push eax
push 2
call fcn.10061260
add esp, 0x10
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x14]
push eax
push esi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x100614ca
push ebx
push esi
lea eax, [ebp - 0x14]
push eax
push 0x17
call fcn.10061260
add esp, 0x10
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret

Function at 0x10061640
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push 0
call fcn.100a11f8
mov ecx, eax
add esp, 0x18
xor eax, eax
test ecx, ecx
je 0x10061667
cmp ecx, 0xffffffff
cmovne eax, ecx
pop ebp
ret