joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4efbd0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
call fcn.004efd20
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
pop esi
jne 0x4efbf0
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esp + 0x14], 0
call sub.WS2_32.dll_setsockopt
mov eax, 1
pop ecx
ret

Function at 0x4efbd1
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
call fcn.004efd20
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
pop esi
jne 0x4efbf0
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esp + 0x14], 0
call sub.WS2_32.dll_setsockopt
mov eax, 1
pop ecx
ret

Function at 0x4efc20
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
xor eax, eax
push esi
push edi
mov dword [esp + 8], eax
mov edi, ecx
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], eax
push ecx
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
call sub.WS2_32.dll_htons
mov esi, dword [esp + 0x1c]
mov word [esp + 0xa], ax
push esi
call sub.WS2_32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x4efc77
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x4efc8d
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
lea edx, [esp + 8]
push 0x10
push edx
mov ecx, edi
call fcn.004efcb0
pop edi
pop esi
add esp, 0x10
ret 8
push 0x2726
call sub.WS2_32.dll_WSASetLastError
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 8

Function at 0x4efcb0
Capabilities:
Connect socket

Disassembly:
mov eax, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
mov eax, dword [ecx]
push edx
push eax
call sub.WS2_32.dll_connect
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret 8

Function at 0x4efd40
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x4efd89
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4
Function at 0x4f0200
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5c2250
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.004efdb0
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.004efe30
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.004efe30
lea ecx, [esi + 0xc]
call fcn.005b111b
lea ecx, [esi + 0x10]
call fcn.005b111b
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.004f2660
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.004f2660
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.004f2660
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.005b1190
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.005b1190
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret

Function at 0x4f0ea8
Capabilities:
Get hostname

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5c2478
push eax
mov dword fs:[0], esp
sub esp, 0x64
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x4f0eb8
call fcn.004f13d0
mov edi, dword [esp + 0x7c]
test edi, edi
je 0x4f0f9b
cmp byte [edi], 0
je 0x4f0f9b
mov eax, dword [esp + 0x8c]
test eax, eax
jg 0x4f0edd
mov eax, 0x7d0
mov ecx, esi
mov dword [esi + 8], eax
call fcn.004efbd0
test eax, eax
jne 0x4f0efd
push 0x88b834
lea ecx, [esi + 0x38]
call fcn.005b1319
jmp 0x4f0f9b
mov eax, dword [esp + 0x80]
mov ecx, esi
push eax
push edi
call fcn.004efc20
test eax, eax
jne 0x4f0f2c
mov ecx, esi
call fcn.004efd20
push edi
add esi, 0x38
push 0x88b810
push esi
call fcn.005ae8b2
add esp, 0xc
jmp 0x4f0f9b
push 0xdc
mov ecx, esi
mov dword [esi + 4], 1
call fcn.004f1c50
test eax, eax
je 0x4f0f94
lea ecx, [esp + 8]
push 0x64
push ecx
call sub.WS2_32.dll_gethostname
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
lea edx, [esp + 0x8c]
mov dword [esp + 0x8c], 1
push edx
push eax
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.004f1070
test eax, eax
jne 0x4f0fb0
push edi
lea eax, [esi + 0x38]
push 0x88b7ec
push eax
call fcn.005ae8b2
add esp, 0xc
mov ecx, esi
call fcn.004f13d0
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x4f1058
mov ecx, dword [0x8a6d68]
mov dword [esp + 0x7c], ecx
lea edx, [esp + 8]
lea eax, [esp + 0x7c]
push edx
push str.HELO__s_r_n
push eax
mov dword [esp + 0x80], 0
call fcn.005ae8b2
mov edx, dword [esp + 0x88]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, esi
call fcn.004efcd0
test eax, eax
jne 0x4f101a
push 0x88b7d0
lea ecx, [esi + 0x38]
call fcn.005b1319
jmp 0x4f102a
push 0xfa
mov ecx, esi
call fcn.004f1c50
test eax, eax
jne 0x4f1047
mov ecx, esi
call fcn.004f13d0
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.005b1190
jmp 0x4f0f9b
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.005b1190
mov ecx, dword [esp + 0x6c]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
Function at 0x4f7f30
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x5c29e0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x10]
call fcn.004f8300
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0
call fcn.004f8300
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x10]
push eax
mov byte [esp + 0x3c], 1
call fcn.004f8370
lea ecx, [esp + 0x10]
call fcn.004f6d50
cmp eax, 1
jae 0x4f7fd8
mov ebx, dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0
push 0
call ebx
mov edi, eax
test edi, edi
je 0x4f8043
lea ecx, [edi + 1]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x4f8043
push esi
push edi
call ebx
push esi
lea ecx, [esp + 0x14]
call fcn.004f8370
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea ecx, [esp + 0x10]
call fcn.004f6d50
cmp eax, 1
jb 0x4f8043
lea edx, [esp + 0x10]
mov ecx, ebp
push edx
call fcn.004f7dd0
test eax, eax
je 0x4f8043
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.004f80b0
mov edi, dword [esp + 0x44]
xor esi, esi
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x24]
call fcn.004f83d0
push edi
lea ecx, [esp + 0x24]
call fcn.004f83f0
push esi
lea ecx, [esp + 0x24]
call fcn.004f8490
push str..tmp
lea ecx, [esp + 0x24]
call fcn.004f83f0
lea edx, [esp + 0x20]
mov ecx, ebp
push edx
call fcn.004f7db0
test eax, eax
je 0x4f8079
inc esi
cmp esi, 0x7a0a1f00
jb 0x4f7ffa
lea ecx, [esp + 0x20]
mov byte [esp + 0x38], 0
call fcn.004f8320
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], 0xffffffff
call fcn.004f8320
xor eax, eax
mov ecx, dword [esp + 0x30]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret 0xc
mov ecx, dword [esp + 0x40]
lea eax, [esp + 0x20]
push eax
call fcn.004f83d0
lea ecx, [esp + 0x20]
mov byte [esp + 0x38], 0
call fcn.004f8320
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], 0xffffffff
call fcn.004f8320
mov eax, 1
jmp 0x4f8064
Function at 0x4f8820
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5c2a98
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0xc]
call fcn.004f8300
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0xc]
push eax
mov dword [esp + 0x28], 0
call fcn.004f8370
push 0
mov ecx, esi
call fcn.004f87a0
mov ebx, dword [esp + 0x2c]
cmp ebx, 1
jb 0x4f8958
lea ecx, [esp + 0xc]
call fcn.004f6d50
cmp eax, 1
jae 0x4f88a7
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0xffffffff
call fcn.004f8320
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 0xc
mov eax, dword [esp + 0x34]
lea edi, [esi + 0xc]
test eax, eax
jne 0x4f88f4
push 0
lea ecx, [esp + 0x10]
call fcn.004f8720
push eax
push edi
mov ecx, 0x8d9bbc
call fcn.004f7f30
test eax, eax
jne 0x4f88fc
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0xffffffff
call fcn.004f8320
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 0xc
push eax
mov ecx, edi
call fcn.004f8370
push edi
mov ecx, 0x8d9bbc
call fcn.004f7e90
push 0
push 2
push 2
push 0
push 3
push 0xc0000000
mov ecx, edi
call fcn.004f8710
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x4f8958
push 0
push ebx
push 0
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esi + 4], eax
je 0x4f8958
push 0
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [esi + 8], eax
jne 0x4f8988
push 1
mov ecx, esi
call fcn.004f87a0
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0xffffffff
call fcn.004f8320
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 0xc
lea ecx, [esp + 0xc]
mov dword [esi + 0x1c], ebx
mov dword [esp + 0x24], 0xffffffff
call fcn.004f8320
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret 0xc

Function at 0x4f9300
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
mov ecx, 0x41
xor eax, eax
push edi
lea edi, [esp + 4]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 4]
push ecx
mov ecx, dword [esp + 0x110]
call fcn.004f8370
pop edi
add esp, 0x104
ret 4
Function at 0x4fcef0
Capabilities:
Terminate process

Disassembly:
push ecx
push ebx
push ebp
push esi
push 0x800
call fcn.0059f547
mov esi, dword [esp + 0x18]
add esp, 4
mov edx, eax
xor ebp, ebp
test esi, esi
mov dword [esp + 0xc], edx
jne 0x4fcf18
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
cmp ecx, 0x800
jbe 0x4fcf33
pop esi
pop ebp
pop ebx
pop ecx
ret
mov al, byte [esi]
inc esi
test al, al
je 0x4fd009
cmp ebp, 0x400
je 0x4fcff4
cmp al, 0x25
jne 0x4fcfd3
mov al, byte [esi]
inc esi
test al, al
je 0x4fcfec
mov cl, byte [esi]
inc esi
test cl, cl
mov byte [esp + 0x14], cl
je 0x4fcfec
movsx eax, al
push eax
call fcn.005a04d0
movsx ecx, byte [esp + 0x18]
push ecx
mov bl, al
call fcn.005a04d0
movsx edx, bl
push edx
mov byte [esp + 0x20], al
call fcn.0059e881
add esp, 0xc
test eax, eax
je 0x4fd002
movsx eax, byte [esp + 0x14]
push eax
call fcn.0059e881
add esp, 4
test eax, eax
je 0x4fd002
cmp bl, 0x39
jg 0x4fcfb2
add bl, 0xd0
jmp 0x4fcfb5
add bl, 0xa9
mov al, byte [esp + 0x14]
cmp al, 0x39
jg 0x4fcfc1
add al, 0xd0
jmp 0x4fcfc3
add al, 0xa9
mov ecx, dword [esp + 0xc]
shl bl, 4
add bl, al
mov edx, ecx
mov byte [ecx + ebp], bl
jmp 0x4fcfe0
cmp al, 0x2b
jne 0x4fcfdd
mov byte [edx + ebp], 0x20
jmp 0x4fcfe0
mov byte [edx + ebp], al
mov al, byte [esi]
inc ebp
inc esi
test al, al
jne 0x4fcf3e
cmp ebp, 0x400
jne 0x4fd009
pop esi
pop ebp
mov byte [edx + 0x3ff], 0
mov eax, edx
pop ebx
pop ecx
ret
push 0
call fcn.005a1538
mov byte [edx + ebp], 0
pop esi
pop ebp
mov eax, edx
pop ebx
pop ecx
ret

Function at 0x500be0
Capabilities:
Set socket configuration

Disassembly:
push ecx
mov ecx, dword [esp + 8]
lea eax, [esp]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0xc], 0
call sub.WS2_32.dll_ioctlsocket
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov eax, edx
pop ecx
ret

Function at 0x500c10
Capabilities:
Set socket configuration

Disassembly:
push ecx
mov ecx, dword [esp + 8]
lea eax, [esp]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0xc], 1
call sub.WS2_32.dll_ioctlsocket
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov eax, edx
pop ecx
ret

Function at 0x500c40
Capabilities:
Create tcp socket
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 1
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x500c60
or eax, 0xffffffff
add esp, 0x190
ret
push 6
push 1
push 2
call sub.WS2_32.dll_socket
add esp, 0x190
ret
Function at 0x500c90
Capabilities:
Connect socket
Get socket status

Disassembly:
sub esp, 0x228
push esi
mov esi, dword [esp + 0x234]
test esi, esi
je 0x500e7e
mov ecx, dword [esp + 0x23c]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
push ebx
shr eax, 0x1f
add edx, eax
push edi
test edx, edx
mov edi, 1
mov dword [esp + 0xc], edx
jg 0x500cd1
mov dword [esp + 0xc], edi
xor ecx, ecx
push esi
mov dword [esp + 0x18], ecx
mov word [esp + 0x18], 2
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
call sub.WS2_32.dll_inet_addr
mov edx, dword [esp + 0x240]
mov dword [esp + 0x18], eax
push edx
call sub.WS2_32.dll_htons
mov esi, dword [esp + 0x238]
mov word [esp + 0x16], ax
push esi
call fcn.00500c10
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [esp + 0x14]
push 0x10
push eax
push esi
call sub.WS2_32.dll_connect
test eax, eax
jge 0x500e67
call fcn.00500880
push eax
call fcn.00500e90
add esp, 4
cmp eax, 0xffffd8cd
je 0x500d64
cmp eax, 0xffffd8cc
je 0x500d64
push esi
mov edi, eax
call fcn.00500be0
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], 0
test eax, eax
jle 0x500e19
lea ebx, [esi + 1]
lea ecx, [esp + 0x24]
lea edx, [esp + 0x2c]
push ecx
push 0
lea eax, [esp + 0x138]
push edx
push eax
push ebx
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], edi
mov dword [esp + 0x148], esi
mov dword [esp + 0x144], edi
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0x2710
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
je 0x500e4d
lea ecx, [esp + 0x2c]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x500e67
lea edx, [esp + 0x130]
push edx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x500e67
mov ecx, dword [esp + 0x248]
mov eax, dword [esp + 0x24c]
cmp dword [ecx], eax
je 0x500e33
call fcn.00500880
test eax, eax
jne 0x500e4d
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x500d7b
push esi
mov edi, 0xfffffff5
call fcn.00500be0
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
push esi
mov edi, 0xffffffec
call fcn.00500be0
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
push esi
mov edi, 0xfffffffb
call fcn.00500be0
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
push esi
xor edi, edi
call fcn.00500be0
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
add esp, 0x228
ret
xor eax, eax
pop esi
add esp, 0x228
ret
Function at 0x5012a0
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
sub esp, 0x10c
mov ecx, dword [esp + 0x114]
push esi
mov esi, dword [esp + 0x114]
mov dword [esp + 0xc], 1
test ecx, ecx
mov dword [esp + 0x10], esi
jne 0x5012d3
push ecx
lea eax, [esp + 0x10]
push ecx
push eax
push ecx
lea ecx, [esi + 1]
push ecx
jmp 0x50132b
cmp ecx, 0xffffffff
jne 0x5012ea
mov dword [esp + 4], 0
mov dword [esp + 8], 0
jmp 0x501319
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 4], edx
mov ecx, 0x3e8
cdq
idiv ecx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
mov dword [esp + 8], edx
lea eax, [esp + 4]
lea ecx, [esp + 0xc]
push eax
push 0
push ecx
lea edx, [esi + 1]
push 0
push edx
call sub.WS2_32.dll_select
test eax, eax
jge 0x501341
mov eax, 0xfffffffb
pop esi
add esp, 0x10c
ret
jne 0x501350
mov eax, 0xfffffffa
pop esi
add esp, 0x10c
ret
lea eax, [esp + 0xc]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5013a9
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x120]
push 0
push ecx
push edx
push esi
call sub.WS2_32.dll_send
test eax, eax
jg 0x501391
call fcn.00500880
push eax
call fcn.00500e90
add esp, 4
pop esi
add esp, 0x10c
ret
mov ecx, dword [0x8d9bf0]
test ecx, ecx
je 0x5013ae
mov edx, dword [ecx]
pop esi
add edx, eax
mov dword [ecx], edx
add esp, 0x10c
ret
mov eax, 0xfffffff7
pop esi
add esp, 0x10c
ret

Function at 0x5013c0
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x5013cf
ret
mov ecx, dword [eax + 0xc]
push esi
push edi
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call sub.WS2_32.dll_inet_ntoa
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
ret

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

Disassembly:
sub esp, 0x14
mov edx, dword [esp + 0x18]
lea eax, [esp]
lea ecx, [esp + 4]
push eax
push ecx
push edx
mov dword [esp + 0xc], 0x10
call sub.WS2_32.dll_getsockname
test eax, eax
jne 0x501596
mov eax, dword [esp + 6]
push eax
call sub.WS2_32.dll_ntohs
and eax, 0xffff
add esp, 0x14
ret
or eax, 0xffffffff
add esp, 0x14
ret

Function at 0x5015a0
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x64
lea eax, [esp]
push esi
push 0x64
push eax
xor esi, esi
call sub.WS2_32.dll_gethostname
lea ecx, [esp + 4]
push ecx
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x5015c5
pop esi
add esp, 0x64
ret
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
test eax, eax
je 0x5015d8
mov eax, dword [eax]
push eax
call sub.WS2_32.dll_inet_ntoa
mov esi, eax
mov eax, esi
pop esi
add esp, 0x64
ret
Function at 0x501900
Capabilities:
Terminate thread

Disassembly:
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
push esi
push eax
call fcn.00501a30
add esp, 8
test eax, eax
jne 0x501919
pop esi
ret
mov eax, dword [esi + 0x8c]
test eax, eax
jne 0x501925
pop esi
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x8c], 0
pop esi
ret

Function at 0x501940
Capabilities:
Terminate thread

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
mov eax, dword [edi + 0x38c]
mov esi, dword [edi]
push eax
call fcn.00501c40
add esp, 4
test esi, esi
je 0x5019ca
mov edi, dword [esp + 0xc]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x5019be
cmp dword [esi + 8], 0xffffffff
je 0x5019be
push 0
push eax
call ebp
mov dword [esi + 0x8c], 0
mov ecx, dword [edi + 0xa0]
test ecx, ecx
je 0x5019ac
mov eax, dword [esi + 0x1c]
push 0
lea edx, [eax*8]
sub edx, eax
lea eax, [ecx + edx*4]
mov ecx, dword [ecx + edx*4 + 0x14]
mov edx, dword [eax + 0xc]
add ecx, edx
push ecx
jmp 0x5019b0
push 0
push 0
push esi
push 8
push 0x15
push edi
call fcn.004fd400
add esp, 0x18
mov esi, dword [esi + 0x48]
test esi, esi
jne 0x501966
mov edi, dword [esp + 0x14]
pop ebp
mov edx, dword [edi + 0x38c]
push edx
call fcn.00501c50
add esp, 4
pop edi
pop esi
ret

Function at 0x502e40
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
mov edx, eax
dec eax
test edx, edx
je 0x502e7c
push ebx
push esi
lea esi, [eax + 1]
mov eax, dword [esp + 0x14]
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, ah
mov ax, word [edx*2 + 0x848788]
xor ax, bx
inc ecx
dec esi
jne 0x502e58
pop esi
pop ebx
ret
mov ax, word [esp + 0xc]
ret
Function at 0x506b80
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x506d52
xor ecx, ecx
xor edx, edx
mov ch, byte [eax]
mov dl, byte [eax + 2]
mov cl, byte [eax + 1]
push ebx
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + 3]
push ebp
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + 6]
mov dword [eax], ecx
xor ecx, ecx
push esi
mov ch, byte [eax + 4]
push edi
mov cl, byte [eax + 5]
xor ebp, ebp
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + 7]
shl ecx, 8
or ecx, edx
mov edx, dword [esp + 0x18]
mov dword [eax + 4], ecx
xor ecx, ecx
mov ch, byte [eax + 8]
lea edi, [edx + 0xc]
mov cl, byte [eax + 9]
mov word [eax + 8], cx
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov cx, word [eax + 8]
mov word [edx + 8], cx
xor ecx, ecx
movzx si, byte [eax + 0xb]
mov ch, byte [eax + 0xa]
or ecx, esi
mov word [eax + 0xa], cx
mov word [edx + 0xa], cx
movzx si, byte [eax + 0xb]
xor ecx, ecx
mov ch, byte [eax + 0xa]
or ecx, esi
mov esi, dword [eax + 0xc]
mov word [eax + 0xa], cx
and ecx, 0xffff
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx si, byte [eax + 0x11]
mov bp, word [eax + 0xa]
xor ecx, ecx
mov ch, byte [eax + 0x10]
add ebp, 0xc
or ecx, esi
mov word [eax + 0x10], cx
mov word [edx + ebp], cx
movzx si, byte [eax + 0x11]
xor ecx, ecx
lea edi, [edx + ebp + 2]
mov ch, byte [eax + 0x10]
or ecx, esi
mov esi, dword [eax + 0x14]
mov word [eax + 0x10], cx
and ecx, 0xffff
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx si, byte [eax + 0x19]
xor ecx, ecx
mov cx, word [eax + 0x10]
lea ebp, [ecx + ebp + 2]
xor ecx, ecx
mov ch, byte [eax + 0x18]
or ecx, esi
lea edi, [edx + ebp + 2]
mov word [eax + 0x18], cx
mov word [edx + ebp], cx
movzx si, byte [eax + 0x19]
xor ecx, ecx
mov ch, byte [eax + 0x18]
or ecx, esi
mov esi, dword [eax + 0x1c]
mov word [eax + 0x18], cx
and ecx, 0xffff
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx si, byte [eax + 0x21]
xor ecx, ecx
mov cx, word [eax + 0x18]
lea ebp, [ecx + ebp + 2]
xor ecx, ecx
mov ch, byte [eax + 0x20]
or ecx, esi
lea edi, [edx + ebp + 2]
mov word [eax + 0x20], cx
mov word [edx + ebp], cx
movzx si, byte [eax + 0x21]
xor ecx, ecx
mov ch, byte [eax + 0x20]
or ecx, esi
mov esi, dword [eax + 0x24]
mov word [eax + 0x20], cx
and ecx, 0xffff
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dl, byte [eax + 6]
xor ecx, ecx
mov ch, byte [eax + 4]
pop edi
mov cl, byte [eax + 5]
pop esi
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + 7]
pop ebp
shl ecx, 8
or ecx, edx
xor edx, edx
mov dh, byte [eax]
mov dword [eax + 4], ecx
mov dl, byte [eax + 1]
xor ecx, ecx
mov ch, byte [eax + 8]
pop ebx
mov cl, byte [eax + 9]
mov word [eax + 8], cx
xor ecx, ecx
mov cl, byte [eax + 2]
shl edx, 8
or edx, ecx
xor ecx, ecx
mov cl, byte [eax + 3]
shl edx, 8
or edx, ecx
mov dword [eax], edx
ret