joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403eb0
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x4207ec], 0
je 0x403ed3
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
neg eax
sbb eax, eax
neg eax
jmp 0x403efd
push ebx
lea eax, [ebp - 0xc]
push dword [ebp + 8]
push eax
call fcn.00403f01
push dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [ebp - 0xc]
test eax, eax
setne bl
call fcn.00402e7d
pop ecx
mov al, bl
pop ebx
leave
ret 8

Function at 0x403f53
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x4207ec], 0
je 0x403f73
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
neg eax
sbb eax, eax
neg eax
jmp 0x403f99
push ebx
lea eax, [ebp - 0xc]
push dword [ebp + 8]
push eax
call fcn.00403f01
push dword [eax]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push dword [ebp - 0xc]
test eax, eax
setne bl
call fcn.00402e7d
pop ecx
mov al, bl
pop ebx
leave
ret 4

Function at 0x40402f
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x4207ec], 0
je 0x404051
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
neg eax
sbb eax, eax
neg eax
jmp 0x404073
push ebx
lea eax, [ebp - 0xc]
push dword [ebp + 8]
push eax
call fcn.00403f01
push dword [eax]
call fcn.0040401a
push dword [ebp - 0xc]
mov bl, al
call fcn.00402e7d
pop ecx
mov al, bl
pop ebx
leave
ret 4

Function at 0x404271
Capabilities:
Delete file
Set file attributes

Disassembly:
push 0
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x404285
xor al, al
jmp 0x404295
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
neg eax
ret 4

Function at 0x404298
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x4207ec], 0
je 0x4042c6
push 0
push dword [ebp + 8]
call fcn.00403eb0
test al, al
je 0x4042e8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
neg eax
jmp 0x4042e8
push ebx
lea eax, [ebp - 0xc]
push dword [ebp + 8]
push eax
call fcn.00403f01
push dword [eax]
call fcn.00404271
push dword [ebp - 0xc]
mov bl, al
call fcn.00402e7d
pop ecx
mov al, bl
pop ebx
leave
ret 4
Function at 0x404584
Capabilities:
Get common file path

Disassembly:
mov eax, 0x41873c
call fcn.00417e80
sub esp, 0x18
push ebx
xor ebx, ebx
cmp byte [0x4207ec], bl
je 0x4045f0
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, 0x105
cmp dword [esi + 8], edi
jg 0x4045b7
push 0x106
mov ecx, esi
call fcn.00401d26
push dword [esi]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, dword [esi]
xor edx, edx
cmp word [ecx], bx
je 0x4045d3
mov edi, ecx
inc edx
inc edi
inc edi
cmp word [edi], bx
jne 0x4045cb
mov word [ecx + edx*2], bx
mov dword [esi + 4], edx
pop edi
cmp eax, ebx
pop esi
jbe 0x4045ec
cmp eax, 0x104
ja 0x4045ec
push 1
pop eax
jmp 0x404643
xor eax, eax
jmp 0x404643
push 0xf
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
call fcn.004028a0
lea eax, [ebp - 0x18]
mov dword [ebp - 4], ebx
push eax
call fcn.0040453e
test al, al
je 0x404638
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00403e8a
mov ecx, dword [ebp + 8]
push eax
mov byte [ebp - 4], 1
call fcn.004019b5
push dword [ebp - 0x24]
call fcn.00402e7d
pop ecx
mov bl, 1
push dword [ebp - 0x18]
call fcn.00402e7d
pop ecx
mov al, bl
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
leave
ret 4

Function at 0x4048e2
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, 0x418780
call fcn.00417e80
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 1
mov eax, dword [esi]
push 0
mov dword [edi], eax
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [edi + 0x14], eax
mov eax, dword [esi + 0x18]
push 0
mov dword [edi + 0x18], eax
push dword [esi + 0x1c]
call fcn.00418020
mov ecx, dword [esi + 0x20]
xor ebx, ebx
add eax, ecx
lea ecx, [ebp - 0x18]
mov dword [edi + 0x20], eax
lea eax, [esi + 0x2c]
adc edx, ebx
push eax
mov dword [edi + 0x24], edx
call fcn.00402850
and dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_AreFileApisANSI]
neg eax
sbb eax, eax
inc eax
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0040499b
push eax
lea ecx, [edi + 0x30]
mov byte [ebp - 4], 1
call fcn.004019b5
push dword [ebp - 0x24]
call fcn.00402e7d
push dword [ebp - 0x18]
call fcn.00402e7d
mov eax, dword [esi + 0x24]
pop ecx
pop ecx
mov dword [edi + 0x28], eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8

Function at 0x404b65
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push esi
push eax
push dword [ecx + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x404b8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x404b8c
xor al, al
jmp 0x404bac
push 1
push 0
push 0
push dword [ebp - 4]
call fcn.00418020
mov ecx, eax
xor eax, eax
add ecx, esi
adc edx, eax
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov al, 1
pop esi
leave
ret 4
Function at 0x40573b
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
mov ebx, ecx
push edi
mov eax, dword [esi]
and dword [esi + 4], 0
and byte [eax], 0
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov edi, eax
test edi, edi
jne 0x405768
call dword [sym.imp.KERNEL32.dll_GetLastError]
neg eax
sbb eax, eax
inc eax
jmp 0x4057a2
cmp edi, dword [esi + 8]
jl 0x405778
lea eax, [edi + 1]
mov ecx, esi
push eax
call fcn.004028a0
mov eax, dword [esi]
inc edi
push edi
push eax
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, esi
mov edi, eax
call fcn.00404652
test edi, edi
jne 0x4057a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
neg eax
sbb eax, eax
neg eax
jmp 0x4057a2
mov al, 1
pop edi
pop esi
pop ebx
ret 4

Function at 0x4057a8
Capabilities:
Get graphical window text

Disassembly:
mov eax, 0x4188fc
call fcn.00417e80
sub esp, 0x18
cmp byte [0x4207ec], 0
push ebx
push esi
push edi
mov ebx, ecx
je 0x40582c
mov esi, dword [ebp + 8]
mov eax, dword [esi]
and dword [esi + 4], 0
and word [eax], 0
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov edi, eax
test edi, edi
je 0x40581b
cmp edi, dword [esi + 8]
jl 0x4057ee
lea eax, [edi + 1]
mov ecx, esi
push eax
call fcn.00401d26
mov eax, dword [esi]
inc edi
push edi
push eax
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [esi]
xor ebx, ebx
xor edx, edx
cmp word [ecx], bx
je 0x405810
mov edi, ecx
inc edx
inc edi
inc edi
cmp word [edi], bx
jne 0x405808
mov word [ecx + edx*2], bx
cmp eax, ebx
mov dword [esi + 4], edx
jne 0x405828
call dword [sym.imp.KERNEL32.dll_GetLastError]
neg eax
sbb eax, eax
inc eax
jmp 0x40587f
mov al, 1
jmp 0x40587f
xor esi, esi
push 0xf
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
call fcn.004028a0
lea eax, [ebp - 0x18]
mov ecx, ebx
push eax
mov dword [ebp - 4], esi
call fcn.0040573b
mov bl, al
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00402729
mov ecx, dword [ebp + 8]
push eax
mov byte [ebp - 4], 1
call fcn.004019b5
push dword [ebp - 0x24]
call fcn.00402e7d
push dword [ebp - 0x18]
call fcn.00402e7d
pop ecx
mov al, bl
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x4085c4
Capabilities:
Get process heap flags

Disassembly:
mov eax, 0x418e0a
call fcn.00417e80
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
mov dword [ebp - 0x10], ebx
mov al, byte [esi]
lea ecx, [ebx + 8]
mov byte [ebx], al
mov al, byte [esi + 1]
mov byte [ebx + 1], al
mov eax, dword [esi + 4]
mov dword [ebx + 4], eax
lea eax, [esi + 8]
push eax
call fcn.00401aaf
mov al, byte [esi + 0x14]
and dword [ebp - 4], 0
mov byte [ebx + 0x14], al
lea eax, [esi + 0x18]
push eax
lea ecx, [ebx + 0x18]
call fcn.00401aaf
lea eax, [esi + 0x28]
lea edx, [ebx + 0x28]
push 0xc
mov esi, eax
pop ecx
mov edi, edx
rep movsd dword es:[edi], dword [esi]
add eax, 0x30
lea ecx, [edx + 0x30]
push eax
mov byte [ebp - 4], 1
call fcn.00401aaf
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, dword [eax + 0x68]
mov dword [ebx + 0x68], eax
mov eax, ebx
pop ebx
mov dword fs:[0], ecx
leave
ret 4

Function at 0x40a5e7
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x419347
call fcn.00417e80
push ecx
push ebx
push esi
mov esi, ecx
xor eax, eax
push edi
mov dword [ebp - 0x10], esi
mov dword [esi], eax
mov dword [ebp - 4], eax
mov dword [esi + 4], eax
mov ecx, dword [ebp + 8]
push 8
mov dword [esi + 8], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0xc], ecx
lea ecx, [esi + 0x10]
pop edi
mov edx, 0x41b748
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], edi
mov dword [ecx], edx
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edi
mov dword [esi + 0x24], edx
lea ebx, [esi + 0x38]
mov edx, 0x41b740
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 4
mov dword [ebx], edx
lea edi, [esi + 0x4c]
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 4
mov dword [edi], edx
push dword [esi + 8]
mov byte [ebp - 4], 5
call fcn.0040317c
push dword [esi + 8]
mov ecx, ebx
call fcn.0040317c
push dword [esi + 0xc]
mov ecx, edi
call fcn.0040317c
push dword [esi + 0xc]
mov ecx, edi
call fcn.0040317c
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x40ac4b
Capabilities:
Create thread

Disassembly:
mov eax, 0x419501
call fcn.00417e80
push ecx
push ecx
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [ebp - 0x14], esi
mov dword [esi], 0x41b7c4
mov dword [esi + 4], 0x41b7b8
lea ecx, [esi + 0xc]
mov dword [esi + 8], edi
call fcn.0040adb9
push 4
lea ecx, [esi + 0x5c]
pop ebx
mov dword [ebp - 4], edi
push ebx
call fcn.00401efa
mov dword [esi + 0x5c], 0x41b7b0
lea ecx, [esi + 0x70]
push ebx
mov byte [ebp - 4], 1
call fcn.00401efa
mov dword [esi + 0x70], 0x41b7a8
lea eax, [esi + 0x84]
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], ebx
mov dword [eax], 0x41b7a0
mov dword [esi + 0x98], edi
push edi
push edi
push edi
lea ecx, [esi + 0x9c]
push edi
mov byte [ebp - 4], bl
call fcn.00405661
lea eax, [esi + 0xa0]
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], ebx
mov dword [eax], 0x41b4b0
push edi
push edi
push edi
lea ecx, [esi + 0xb4]
push edi
mov byte [ebp - 4], 6
call fcn.00405661
push edi
push edi
push edi
lea ecx, [esi + 0xb8]
push 1
mov byte [ebp - 4], 7
call fcn.00405661
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 8
push eax
push edi
push esi
push 0x40ada7
push edi
push edi
mov dword [esi], 0x41b78c
mov dword [esi + 4], 0x41b780
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
mov dword [esi + 0x98], eax
jne 0x40ad55
lea eax, [ebp - 0x10]
push 0x41c198
push eax
mov dword [ebp - 0x10], 0x425d1
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x40b08c
Capabilities:
Create thread

Disassembly:
mov eax, 0x41959b
call fcn.00417e80
sub esp, 0xcc
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x78]
mov ecx, dword [edi + 0x18]
push dword [ecx + eax*8 + 4]
lea eax, [ecx + eax*8]
lea ecx, [ebp - 0xd8]
push dword [eax]
call fcn.0040a757
lea esi, [edi + 0x70]
lea eax, [ebp - 0xd8]
xor ebx, ebx
push eax
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.0040b9b6
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov ecx, dword [ecx + eax*4 - 4]
call fcn.0040a8a0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov eax, dword [edi + 0xb8]
mov ecx, dword [edx + ecx*4 - 4]
mov dword [ecx + 0x64], eax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + eax*4 - 4]
lea ecx, [edi + 0xa0]
mov eax, dword [eax + 0x68]
push dword [eax]
call fcn.0040b8c3
mov dword [ebp - 0x14], ebx
add edi, 0x84
push ebx
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.0040ba61
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov edx, dword [edi + 0xc]
mov eax, dword [ecx + eax*4 - 4]
mov ecx, dword [edi + 8]
lea esi, [edx + ecx*4 - 4]
lea ecx, [ebp - 0x10]
push ecx
push ebx
push eax
push 0x40b182
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi], eax
pop edi
pop esi
cmp eax, ebx
pop ebx
jne 0x40b167
lea eax, [ebp - 0x10]
push 0x41c198
push eax
mov dword [ebp - 0x10], 0x425d0
call sub.MSVCRT.dll__CxxThrowException
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xd8]
call fcn.0040a915
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret

Function at 0x416692
Capabilities:
Hash data using sha256

Disassembly:
and dword [ecx + 0x20], 0
and dword [ecx + 0x24], 0
mov dword [ecx], 0x6a09e667
mov dword [ecx + 4], 0xbb67ae85
mov dword [ecx + 8], 0x3c6ef372
mov dword [ecx + 0xc], 0xa54ff53a
mov dword [ecx + 0x10], 0x510e527f
mov dword [ecx + 0x14], 0x9b05688c
mov dword [ecx + 0x18], 0x1f83d9ab
mov dword [ecx + 0x1c], 0x5be0cd19
ret
Function at 0x401101
Capabilities:
Create thread

Disassembly:
push dword [esp + 8]
push 0
push dword [esp + 0xc]
call dword [sym.imp.MSVCRT.dll__beginthread]
add esp, 0xc
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test byte [eax + 0x55], 1
je 0x401230
lea ecx, [eax + 0x14]
push 0x10
push ecx
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax + 0x10]
call sub.WS2_32.dll_sendto
test eax, eax
jge 0x401242
xor eax, eax
pop ebp
ret
push dword [ebp + 0x10]
add eax, 0x30
push dword [ebp + 0xc]
push eax
call fcn.0040106d
add esp, 0xc
pop ebp
ret

Function at 0x401269
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x10
xor ebx, ebx
pop eax
or edi, 0xffffffff
mov dword [ebp - 4], eax
push eax
lea eax, [ebp - 0x18]
push ebx
push eax
mov dword [ebp - 8], ebx
mov dword [esi + 4], edi
mov dword [esi], edi
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [ebp - 0x18], 2
push ebx
call sub.WS2_32.dll_htons
push 0x7f000001
mov word [ebp - 0x16], ax
call sub.WS2_32.dll_htonl
push ebx
mov dword [ebp - 0x14], eax
push dword [ebp + 0xc]
push 2
call sub.WS2_32.dll_socket
cmp eax, edi
mov dword [ebp + 8], eax
je 0x401396
push dword [ebp - 4]
lea ecx, [ebp - 0x18]
push ecx
push eax
call sub.WS2_32.dll_bind
test eax, eax
jne 0x401396
cmp dword [ebp + 0xc], 2
je 0x4012f6
push 1
push dword [ebp + 8]
call sub.WS2_32.dll_listen
test eax, eax
jne 0x401396
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll_getsockname
test eax, eax
jne 0x401396
push ebx
push dword [ebp + 0xc]
push 2
call sub.WS2_32.dll_socket
cmp eax, edi
mov dword [esi], eax
je 0x401396
push dword [ebp - 4]
lea ecx, [ebp - 0x18]
push ecx
push eax
call sub.WS2_32.dll_connect
test eax, eax
jne 0x401396
push 1
pop ebx
cmp dword [ebp + 0xc], ebx
je 0x40135e
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [esi]
call sub.WS2_32.dll_getsockname
test eax, eax
jne 0x401396
push dword [ebp - 4]
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll_connect
test eax, eax
jne 0x401396
cmp dword [ebp + 0xc], 2
jne 0x401369
mov eax, dword [ebp + 8]
jmp 0x401379
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll_accept
cmp eax, edi
mov dword [esi + 4], eax
je 0x401396
push dword [esi]
call fcn.0040125a
push dword [esi + 4]
call fcn.0040125a
pop ecx
mov dword [ebp - 8], ebx
pop ecx
jmp 0x4013b4
mov eax, dword [esi]
cmp eax, edi
je 0x4013a2
push eax
call sub.WS2_32.dll_closesocket
mov eax, dword [esi + 4]
cmp eax, edi
je 0x4013af
push eax
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], edi
mov dword [esi], edi
cmp dword [ebp + 0xc], 2
pop edi
pop esi
pop ebx
je 0x4013c5
push dword [ebp + 8]
call sub.WS2_32.dll_closesocket
mov eax, dword [ebp - 8]
leave
ret
Function at 0x4013d8
Capabilities:
Resolve dns

Disassembly:
push dword [esp + 4]
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x4013e6
ret
mov eax, dword [eax + 0xc]
push 4
push dword [eax]
push dword [esp + 0x10]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 1
pop eax
ret

Function at 0x401651
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, dword [ebp + 8]
push 0
push dword [ebp + 0xc]
mov dword [ebp - 4], 0x10
movzx eax, word [edi]
push eax
call sub.WS2_32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
je 0x4016b3
push dword [ebp - 4]
push edi
push esi
call sub.WS2_32.dll_bind
test eax, eax
jne 0x4016aa
cmp dword [ebp + 0xc], 2
je 0x401696
push 5
push esi
call sub.WS2_32.dll_listen
test eax, eax
jne 0x4016aa
push esi
call fcn.004016b9
pop ecx
lea eax, [ebp - 4]
push eax
push edi
push esi
call sub.WS2_32.dll_getsockname
jmp 0x4016b3
push esi
call sub.WS2_32.dll_closesocket
or esi, 0xffffffff
mov eax, esi
pop edi
pop esi
leave
ret

Function at 0x4016d7
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0x10
pop eax
test edi, edi
mov dword [ebp - 4], eax
je 0x40178a
mov esi, dword [ebp + 0x10]
test esi, esi
jbe 0x40178a
and byte [edi], 0
push eax
lea eax, [ebp - 0x14]
push 0
push eax
call sub.MSVCRT.dll_memset
mov ebx, dword [ebp + 0x14]
add esp, 0xc
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
test bl, 4
je 0x401728
call sub.WS2_32.dll_getpeername
jmp 0x40172d
call sub.WS2_32.dll_getsockname
and ebx, 1
je 0x401746
push esi
push dword [ebp - 0x10]
call sub.WS2_32.dll_inet_ntoa
push eax
push edi
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
test byte [ebp + 0x14], 2
je 0x40178a
test ebx, ebx
mov ebx, 0x41e7e8
jne 0x40175a
mov ebx, 0x420968
push dword [ebp - 0x12]
call sub.WS2_32.dll_ntohs
movzx eax, ax
push eax
push ebx
push str._s_d
push edi
call sub.MSVCRT.dll_strlen
sub esi, eax
pop ecx
dec esi
push esi
push edi
call sub.MSVCRT.dll_strlen
pop ecx
add eax, edi
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401d42
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
and dword [ebp - 4], 0
push esi
mov esi, dword [ebp + 8]
test byte [esi + 0x54], 8
je 0x401da4
lea eax, [ebp - 8]
mov dword [ebp + 8], 1
push eax
lea eax, [ebp + 8]
push eax
push 0x1007
push 0xffff
mov dword [ebp - 8], 4
push dword [esi + 0x10]
call sub.WS2_32.dll_getsockopt
and dword [esi + 0x54], 0xfffffff7
cmp dword [ebp + 8], 0
mov eax, dword [esi + 0x54]
je 0x401d93
or al, 0x10
mov dword [esi + 0x54], eax
lea eax, [ebp + 8]
push eax
push 2
push esi
call fcn.00401af3
add esp, 0xc
jmp 0x401df6
push edi
push 0
mov edi, 0x800
lea eax, [ebp - 0x808]
push edi
push eax
push dword [esi + 0x10]
call sub.WS2_32.dll_recv
test eax, eax
mov dword [ebp - 4], eax
push eax
jle 0x401de7
lea eax, [ebp - 0x808]
push eax
lea eax, [esi + 0x24]
push eax
call fcn.0040106d
lea eax, [ebp - 4]
push eax
push 3
push esi
call fcn.00401af3
add esp, 0x18
push 0
jmp 0x401dac
call fcn.00401df9
pop ecx
pop edi
test eax, eax
je 0x401df6
or dword [esi + 0x54], 0x10
pop esi
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0
push dword [esi + 0x34]
lea edi, [esi + 0x30]
and dword [ebp + 8], 0
push dword [edi]
push dword [esi + 0x10]
call sub.WS2_32.dll_send
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push 4
push esi
call fcn.00401af3
push dword [ebp + 8]
call fcn.00401df9
add esp, 0x10
test eax, eax
je 0x401e8c
or dword [esi + 0x54], 0x10
jmp 0x401e9d
cmp dword [ebp + 8], 0
jle 0x401e9d
push dword [ebp + 8]
push edi
call fcn.004010d3
pop ecx
pop ecx
pop edi
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x830
push esi
push 0x58
lea eax, [ebp - 0x60]
push 0
push eax
mov dword [ebp - 8], 0x10
call sub.MSVCRT.dll_memset
add esp, 0xc
mov esi, dword [ebp + 8]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0
lea eax, [ebp - 0x830]
push 0x7d0
push eax
push dword [esi + 0x10]
call sub.WS2_32.dll_recvfrom
test eax, eax
mov dword [ebp - 4], eax
jle 0x401f33
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x10]
lea ecx, [ebp - 0x830]
mov dword [ebp - 0x50], eax
mov eax, dword [esi + 0x50]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x48]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x60]
push 3
push eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x58], esi
mov dword [ebp - 0xc], 0x100
call fcn.00401af3
add esp, 0xc
pop esi
leave
ret