joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d5a70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x44
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x54]
xor ebx, ebx
push edi
mov ebp, 0x19
xor edi, edi
nop
cmp edi, 6
jge 0x4d5b14
push 0
push 0x24
push 0
push 0x3c
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_LockFile]
mov ebx, eax
test ebx, ebx
jne 0x4d5ab5
push ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebp, ebp
inc edi
test ebx, ebx
je 0x4d5a90
push 0x40
lea eax, [esp + 0x14]
mov dword [esi + 0x24], 1
push 0
push eax
call fcn.004fa8e0
add esp, 0xc
lea eax, [esp + 0x2c]
push 0x24
push eax
push 0x3c
push esi
call fcn.004d5cc0
test eax, eax
je 0x4d5ba6
lea ecx, [esp + 0x30]
xor edx, edx
lea edi, [esi + 0x74]
mov ebx, ecx
lea eax, [edi + 0x1f]
cmp ebx, eax
ja 0x4d5b30
lea eax, [esp + 0x4f]
cmp eax, edi
jb 0x4d5b30
mov al, byte [edi + edx]
lea ecx, [ecx + 1]
add byte [ecx - 1], al
inc edx
cmp edx, 0x20
jl 0x4d5b03
jmp 0x4d5b59
test ebx, ebx
jne 0x4d5aba
mov dword [0x54fd74], 0x64
jmp 0x4d5bc4
movdqu xmm0, xmmword [esp + 0x30]
movdqu xmm1, xmmword [edi]
paddb xmm1, xmm0
movdqu xmm0, xmmword [esp + 0x40]
movdqu xmmword [esp + 0x30], xmm1
movdqu xmm1, xmmword [edi + 0x10]
paddb xmm1, xmm0
movdqu xmmword [esp + 0x40], xmm1
mov eax, dword [esp + 0x2e]
lea edx, [esp + 0x30]
add eax, dword [esp + 0x2c]
mov edi, 0x20
movzx eax, ax
lea ecx, [ecx]
xor byte [edx], al
lea edx, [edx + 1]
mov cx, ax
add eax, eax
shr cx, 0xf
add cx, ax
movzx eax, cx
mov cx, ax
add eax, eax
shr cx, 0xf
add cx, ax
movzx eax, cx
dec edi
jne 0x4d5b70
cmp dword [esp + 0x4c], edi
je 0x4d5bdb
mov dword [0x54fd74], 0x65
cmp dword [esi + 0x24], 0
je 0x4d5bc4
push 0
push 0x24
push 0
push 0x3c
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov dword [esi + 0x24], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.004f9e32
add esp, 0x44
ret 4
movzx eax, word [esp + 0x32]
mov ecx, dword [esp + 0x50]
mov dword [esi + 0x40], eax
movzx eax, word [esp + 0x34]
mov dword [esi + 0x44], eax
mov al, byte [esp + 0x36]
mov byte [esi + 0x50], al
movzx eax, word [esp + 0x30]
pop edi
mov dword [esi + 4], eax
mov eax, 1
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004f9e32
add esp, 0x44
ret 4
Function at 0x4d5c20
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x10]
push esi
push ebx
push dword [esp + 0x1c]
push edi
call fcn.004d5cc0
test eax, eax
je 0x4d5ca7
xor edx, edx
mov ecx, ebx
test esi, esi
je 0x4d5c5b
mov eax, edx
lea ecx, [ecx + 1]
and eax, 0x1f
inc edx
mov al, byte [eax + edi + 0x74]
add byte [ecx - 1], al
cmp edx, esi
jb 0x4d5c47
mov ax, word [edi + 0x32]
mov edx, ebx
add ax, word [edi + 0x30]
movzx eax, ax
test esi, esi
je 0x4d5c96
mov edi, esi
mov edi, edi
xor byte [edx], al
lea edx, [edx + 1]
mov cx, ax
add eax, eax
shr cx, 0xf
add cx, ax
movzx eax, cx
mov cx, ax
add eax, eax
shr cx, 0xf
add cx, ax
movzx eax, cx
dec edi
jne 0x4d5c70
cmp dword [ebx + esi - 4], 0
je 0x4d5caf
mov dword [0x54fd74], 0x65
pop edi
pop esi
xor eax, eax
pop ebx
ret 0x10
pop edi
pop esi
mov eax, 1
pop ebx
ret 0x10

Function at 0x4d5cc0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 4], eax
push ebx
mov ebx, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x14]
push 0
push 0
push dword [esp + 0x20]
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x4d5d0a
pop edi
mov dword [0x54fd74], 0x65
pop ebx
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.004f9e32
add esp, 8
ret 0x10
push esi
mov esi, dword [esp + 0x24]
lea eax, [esp + 0xc]
push 0
push eax
push esi
push ebx
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4d5d44
cmp dword [esp + 0xc], esi
jne 0x4d5d44
pop esi
pop edi
mov eax, 1
pop ebx
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.004f9e32
add esp, 8
ret 0x10
mov ecx, dword [esp + 0x10]
xor eax, eax
pop esi
pop edi
pop ebx
xor ecx, esp
mov dword [0x54fd74], 0x62
call fcn.004f9e32
add esp, 8
ret 0x10

Function at 0x4d5d70
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x10]
push ebx
push esi
mov esi, dword [esp + 0x14]
lea ebx, [ecx + 0x14]
lea edx, [ecx + 0x18]
push edi
mov edi, 0x18
movzx eax, word [esi + 0x40]
mov word [ebx], ax
movzx eax, word [esi + 0x44]
mov word [ecx + 0x16], ax
movzx eax, word [esi + 0x54]
mov word [edx], ax
movzx eax, word [esi + 0x44]
add ax, word [esi + 0x40]
movzx eax, ax
xor byte [edx], al
lea edx, [edx + 1]
mov cx, ax
add eax, eax
shr cx, 0xf
add cx, ax
movzx eax, cx
mov cx, ax
add eax, eax
shr cx, 0xf
add cx, ax
movzx eax, cx
dec edi
jne 0x4d5db5
mov eax, dword [esi + 0x60]
push 0x1c
push ebx
add eax, 0x14
push eax
push esi
call fcn.004d7500
test eax, eax
jne 0x4d5e03
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.004f9e32
add esp, 8
ret 8
cmp dword [esi + 0x6c], 0
je 0x4d5e10
mov byte [esp + 0xf], 0xfa
jmp 0x4d5e17
mov al, byte [esi + 0x50]
mov byte [esp + 0xf], al
push 1
lea eax, [esp + 0x13]
push eax
push dword [esi + 0x5c]
push esi
call fcn.004d7500
mov ecx, dword [esp + 0x10]
neg eax
pop edi
pop esi
sbb eax, eax
pop ebx
xor ecx, esp
neg eax
call fcn.004f9e32
add esp, 8
ret 8
Function at 0x4d5e80
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x40
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x3c], eax
push ebp
mov ebp, dword [esp + 0x50]
lea eax, [esp + 7]
push esi
mov esi, dword [esp + 0x4c]
push 1
push eax
push dword [esi + 0x5c]
push esi
call fcn.004d5cc0
test eax, eax
je 0x4d5ebd
cmp byte [esp + 0xb], 0xfa
jbe 0x4d5ed2
mov dword [0x54fd74], 0x67
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004f9e32
add esp, 0x40
ret 0xc
push edi
push 0x38
xor edi, edi
lea eax, [esp + 0x14]
push edi
push eax
call fcn.004fa8e0
add esp, 0xc
lea eax, [esp + 0x24]
push 0x1d
push eax
mov eax, dword [esi + 0x60]
add eax, 0x14
push eax
push esi
call fcn.004d5cc0
test eax, eax
jne 0x4d5f11
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004f9e32
add esp, 0x40
ret 0xc
mov eax, dword [esp + 0x26]
lea edx, [esp + 0x28]
add eax, dword [esp + 0x24]
push ebx
movzx eax, ax
mov ebx, 0x18
xor byte [edx], al
lea edx, [edx + 1]
mov cx, ax
add eax, eax
shr cx, 0xf
add cx, ax
movzx eax, cx
mov cx, ax
add eax, eax
shr cx, 0xf
add cx, ax
movzx eax, cx
dec ebx
jne 0x4d5f26
cmp dword [esp + 0x40], edi
je 0x4d5f73
pop ebx
pop edi
pop esi
mov dword [0x54fd74], 0x65
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004f9e32
add esp, 0x40
ret 0xc
mov ax, word [esp + 0x2c]
cmp ax, word [esi + 0x54]
je 0x4d5f9f
pop ebx
pop edi
pop esi
mov dword [0x54fd74], 0x67
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004f9e32
add esp, 0x40
ret 0xc
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x4d5fae
push eax
call fcn.004d9b60
mov edi, eax
test ebp, ebp
je 0x4d6011
test edi, edi
je 0x4d6011
cmp dword [edi + 0x10], 1
jne 0x4d6011
cmp byte [esp + 0x13], 0xfa
jae 0x4d6011
mov al, byte [esp + 0x44]
test al, al
jne 0x4d5ff0
test byte [edi + 0x28], 0x80
jne 0x4d5ff0
push dword [edi + 0x34]
mov eax, dword [esi + 0x64]
push dword [edi + 0x2c]
add eax, dword [esi + 0x60]
push eax
push esi
call fcn.004d5cc0
test eax, eax
je 0x4d6074
mov al, byte [esp + 0x44]
movzx eax, al
xor ecx, ecx
test eax, eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x10], 2
sete cl
mov dword [edi + 0x18], ecx
mov dword [esi + 0x6c], 0
mov dword [ebp], edi
mov edx, dword [esp + 0x58]
test edx, edx
je 0x4d6092
mov edi, dword [esi + 0x3c]
xor ecx, ecx
mov ebx, dword [esi + 0x44]
cmp edi, ebx
jbe 0x4d6039
mov eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x38]
jbe 0x4d603d
mov ecx, ebx
sub ecx, edi
add ecx, 0xa8c0
jmp 0x4d603d
mov ecx, ebx
sub ecx, edi
add ecx, ecx
jns 0x4d6045
xor ecx, ecx
jmp 0x4d6052
mov eax, 0xffff
cmp ecx, 0xffff
jg 0x4d6055
movzx eax, cx
cmp eax, edx
jae 0x4d608b
sub edx, eax
mov eax, edx
xor edx, edx
div dword [esi + 0x34]
mov dword [esi + 0x14], eax
cmp eax, 1
jbe 0x4d6092
mov dword [0x54fd74], 0x63
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004f9e32
add esp, 0x40
ret 0xc
mov dword [esi + 0x14], 0
mov ecx, dword [esp + 0x4c]
mov eax, 1
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004f9e32
add esp, 0x40
ret 0xc
Function at 0x4d7500
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 4], eax
push ebx
mov ebx, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x14]
push 0
push 0
push dword [esp + 0x20]
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x4d754a
pop edi
mov dword [0x54fd74], 0x65
pop ebx
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.004f9e32
add esp, 8
ret 0x10
push esi
mov esi, dword [esp + 0x24]
lea eax, [esp + 0xc]
push 0
push eax
push esi
push ebx
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4d7584
cmp dword [esp + 0xc], esi
jne 0x4d7584
pop esi
pop edi
mov eax, 1
pop ebx
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.004f9e32
add esp, 8
ret 0x10
mov ecx, dword [esp + 0x10]
xor eax, eax
pop esi
pop edi
pop ebx
xor ecx, esp
mov dword [0x54fd74], 0x61
call fcn.004f9e32
add esp, 8
ret 0x10

Function at 0x4d75b0
Capabilities:
Encode data using xor
Query environment variable

Disassembly:
sub esp, 0x108
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x104], eax
push ebx
push esi
push 0x100
xor ebx, ebx
lea eax, [esp + 0x10]
push ebx
push eax
call fcn.004fa8e0
add esp, 0xc
lea eax, [esp + 0xc]
push 0xff
push eax
push 0x411750
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x4d772b
cmp esi, 0x20
jae 0x4d772b
mov ecx, 0x41175c
lea eax, [esp + 0xc]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4d7630
test dl, dl
je 0x4d762c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4d7630
add eax, 2
add ecx, 2
test dl, dl
jne 0x4d7610
xor eax, eax
jmp 0x4d7635
sbb eax, eax
or eax, 1
test eax, eax
je 0x4d772b
mov ecx, 0x411764
lea eax, [esp + 0xc]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4d7666
test dl, dl
je 0x4d7662
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4d7666
add eax, 2
add ecx, 2
test dl, dl
jne 0x4d7646
xor eax, eax
jmp 0x4d766b
sbb eax, eax
or eax, 1
test eax, eax
je 0x4d772b
push 8
lea eax, [esp + 0x10]
push 0x411774
push eax
call fcn.004fbf90
add esp, 0xc
test eax, eax
jne 0x4d76e8
lea eax, [esp + 8]
mov dword [esp + 8], ebx
push eax
lea eax, [esp + 0x10]
push 0x411780
push eax
call fcn.004feccf
add esp, 0xc
cmp eax, 1
jne 0x4d76c7
mov eax, dword [esp + 8]
inc eax
and eax, 0x800000ff
jns 0x4d76be
dec eax
or eax, 0xffffff00
inc eax
movzx ebx, byte [eax + 0x54fdd8]
jmp 0x4d7706
xor edx, edx
test esi, esi
je 0x4d770d
lea ecx, [ecx]
movsx ecx, byte [esp + edx + 0xc]
inc edx
movzx eax, bx
xor ecx, eax
movzx ebx, byte [ecx + 0x54fdd8]
cmp edx, esi
jb 0x4d76d0
jmp 0x4d7706
xor edx, edx
test esi, esi
je 0x4d770d
mov edi, edi
movsx ecx, byte [esp + edx + 0xc]
inc edx
movzx eax, bx
xor ecx, eax
movzx ebx, byte [ecx + 0x54fdd8]
cmp edx, esi
jb 0x4d76f0
xor eax, eax
cmp ax, bx
jne 0x4d7712
mov ebx, 0xff
pop esi
mov al, bl
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004f9e32
add esp, 0x108
ret
mov ecx, dword [esp + 0x10c]
xor al, al
pop esi
pop ebx
xor ecx, esp
call fcn.004f9e32
add esp, 0x108
ret
Function at 0x4d7750
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x220
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x21c], eax
push esi
mov esi, dword [esp + 0x228]
lea eax, [esp + 0x120]
push 0x100
push eax
call sub.WS2_32.dll_gethostname
cmp eax, 0xffffffff
jne 0x4d779d
xor al, al
pop esi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.004f9e32
add esp, 0x220
ret 4
lea eax, [esp + 0x120]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x4d7783
mov eax, dword [eax + 0xc]
push ebx
push 1
mov eax, dword [eax]
mov ebx, dword [eax]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0x10c
push eax
call fcn.004d48d0
test eax, eax
jne 0x4d77ec
mov edx, dword [esp + 0x18]
test edx, edx
jle 0x4d77ec
lea ecx, [esp + 0x1c]
nop
cmp dword [ecx], ebx
je 0x4d77f3
inc eax
add ecx, 0x18
cmp eax, edx
jl 0x4d77e0
xor al, al
jmp 0x4d78b7
lea eax, [eax + eax*2]
mov edx, dword [esp + eax*8 + 0x24]
test edx, edx
je 0x4d77ec
mov ecx, dword [esi + 4]
mov eax, ebx
shr eax, 0x18
and ecx, edx
mov byte [esp + 0x14], al
not edx
mov eax, ebx
mov byte [esp + 0xf], cl
shr eax, 0x10
mov byte [esp + 0x15], al
mov eax, ebx
shr eax, 8
mov byte [esp + 0x16], al
movzx eax, byte [esi + 7]
mov byte [esp + 8], al
movzx eax, byte [esi + 6]
mov byte [esp + 9], al
movzx eax, byte [esi + 5]
mov byte [esp + 0xa], al
movzx eax, byte [esi + 4]
mov byte [esp + 0xb], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0xd], al
mov eax, ecx
mov ecx, dword [esp + 8]
shr eax, 8
mov byte [esp + 0xe], al
mov eax, edx
shr eax, 0x18
mov byte [esp + 0x10], al
mov eax, edx
shr eax, 0x10
mov byte [esp + 0x11], al
mov eax, edx
shr eax, 8
mov byte [esp + 0x12], al
mov byte [esp + 0x13], dl
mov eax, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
or eax, edi
mov byte [esp + 0x1b], bl
cmp ecx, edi
jbe 0x4d78a7
cmp ecx, eax
jae 0x4d78a5
mov edx, dword [esp + 0x18]
cmp edx, edi
jbe 0x4d78a5
cmp edx, eax
jb 0x4d78ad
cmp ecx, edi
je 0x4d78d0
cmp ecx, eax
je 0x4d78d0
mov dword [esi + 8], 1
mov al, 1
pop edi
mov ecx, dword [esp + 0x224]
pop ebx
pop esi
xor ecx, esp
call fcn.004f9e32
add esp, 0x220
ret 4
mov dword [esi + 8], 0
xor al, al
jmp 0x4d78b6
Function at 0x4d7a30
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
xor esi, esi
push esi
push 1
push 2
call sub.WS2_32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
je 0x4d7b81
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 1
push 6
push edi
call sub.WS2_32.dll_setsockopt
xorps xmm0, xmm0
mov eax, 2
movdqu xmmword [esp + 0x14], xmm0
mov word [esp + 0x14], ax
lea eax, [esp + 0x14]
push 0x10
push eax
push edi
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
je 0x4d7b6e
push 0x64
call fcn.004d5270
mov esi, eax
add esp, 4
test esi, esi
je 0x4d7b6e
push 0x64
push 0
push esi
call fcn.004fa8e0
mov dword [esi + 4], edi
add esp, 0xc
mov eax, dword [0x559f30]
mov dword [esi], eax
mov eax, dword [esp + 0x30]
mov dword [0x559f30], esi
mov dword [esi + 0x3c], eax
mov eax, dword [esp + 0x2c]
movdqu xmm0, xmmword [eax]
movdqu xmmword [esi + 0xc], xmm0
movdqu xmm0, xmmword [eax + 0x10]
movdqu xmmword [esi + 0x1c], xmm0
movdqu xmm0, xmmword [eax + 0x20]
mov dword [esi + 0x60], 0
movdqu xmmword [esi + 0x2c], xmm0
mov dword [esi + 0x24], 0
test ebx, ebx
je 0x4d7b40
push ebx
call fcn.004d5270
add esp, 4
mov dword [esi + 0x60], eax
test eax, eax
je 0x4d7b6e
push ebp
push ebx
push eax
call fcn.004fcc08
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.004f9e32
add esp, 0x18
ret 0x10
push 2
call fcn.004d5270
mov dword [esi + 0x60], eax
add esp, 4
mov byte [eax], 0
mov eax, dword [esi + 0x60]
pop edi
mov byte [eax + 1], 0
mov eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.004f9e32
add esp, 0x18
ret 0x10
push edi
call sub.WS2_32.dll_closesocket
test esi, esi
jne 0x4d7b81
push esi
call fcn.004f948a
add esp, 4
mov ecx, dword [esp + 0x24]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004f9e32
add esp, 0x18
ret 0x10

Function at 0x4d7ba0
Capabilities:
Get hostname

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
xor ebp, ebp
push edi
xor edi, edi
test esi, esi
jne 0x4d7bc9
push dword [esp + 0x14]
call fcn.004d5270
mov edi, eax
add esp, 4
test edi, edi
jne 0x4d7bc7
pop edi
pop esi
pop ebp
ret 8
mov esi, edi
push dword [esp + 0x14]
push esi
call sub.WS2_32.dll_gethostname
cmp eax, 0xffffffff
je 0x4d7bec
lea ecx, [esi + 1]
jmp 0x4d7be0
mov al, byte [esi]
inc esi
test al, al
jne 0x4d7be0
sub esi, ecx
lea ebp, [esi + 1]
push edi
call fcn.004f948a
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
ret 8
Function at 0x4d7fc0
Capabilities:
Connect socket

Disassembly:
sub esp, 0x14
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x10], eax
push esi
mov esi, dword [esp + 0x1c]
xorps xmm0, xmm0
movdqu xmmword [esp + 4], xmm0
mov eax, 2
mov word [esp + 4], ax
mov eax, dword [esi + 0x54]
mov dword [esp + 8], eax
movzx eax, word [0x559f38]
push eax
call sub.WS2_32.dll_htons
mov word [esp + 6], ax
lea eax, [esp + 4]
push 0x10
push eax
push dword [esi + 4]
call sub.WS2_32.dll_connect
pop esi
test eax, eax
jns 0x4d8030
mov dword [0x54fd74], 0x69
xor eax, eax
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.004f9e32
add esp, 0x14
ret 4
mov ecx, dword [esp + 0x10]
mov eax, 1
xor ecx, esp
call fcn.004f9e32
add esp, 0x14
ret 4
Function at 0x4d8400
Capabilities:
Create udp socket
Initialize winsock library
Set socket configuration

Disassembly:
sub esp, 0x1a8
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x1a4], eax
cmp dword [0x559f40], 0
jne 0x4d84f8
lea eax, [esp + 0x14]
mov dword [0x559f40], 1
push eax
push 0x101
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4d84f8
push 4
push 0x559f38
push 0x4138a8
push 7
mov dword [0x559f3c], 1
call fcn.004d58a0
add esp, 0x10
test eax, eax
je 0x4d8476
mov eax, dword [0x559f38]
test eax, eax
je 0x4d8476
cmp eax, 0xffff
jbe 0x4d8480
mov dword [0x559f38], 0x574b
push 0x7fff
call fcn.004fe794
add esp, 4
mov dword [0x559f34], eax
test eax, eax
je 0x4d84f3
push 0
push 2
push 2
call sub.WS2_32.dll_socket
mov dword [0x54fed8], eax
cmp eax, 0xffffffff
je 0x4d84f3
push 4
lea ecx, [esp + 4]
mov dword [esp + 4], 1
push ecx
push 0x20
push 0xffff
push eax
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 0
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
je 0x4d84f3
push 0x10
lea eax, [esp + 8]
push eax
push dword [0x54fed8]
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x4d84f8
call fcn.004d8c50
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.004f9e32
add esp, 0x1a8
ret

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

Disassembly:
sub esp, 0x18
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x14], eax
push esi
mov esi, dword [esp + 0x20]
push 0
push 1
push 2
mov eax, dword [esi + 8]
and eax, 0xfffffffd
or eax, 1
mov dword [esi + 8], eax
call sub.WS2_32.dll_socket
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x4d8d7e
push 4
lea ecx, [esp + 8]
mov dword [esp + 8], 1
push ecx
push 1
push 6
push eax
call sub.WS2_32.dll_setsockopt
xorps xmm0, xmm0
mov eax, 2
movdqu xmmword [esp + 8], xmm0
mov word [esp + 8], ax
lea eax, [esp + 8]
push 0x10
push eax
push dword [esi + 4]
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
je 0x4d8d7e
or dword [esi + 0xc], 8
test dword [esi + 0x3c], 0x200000
movzx eax, word [esi + 0x44]
je 0x4d8d4b
movzx eax, word [esi + 0x1e]
push 0
push 0
push 0
push eax
push 0
push esi
call fcn.004d7ca0
test eax, eax
je 0x4d8d7e
mov ecx, dword [0x54fd90]
pop esi
mov dword [ecx + 0x14], eax
mov eax, 1
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.004f9e32
add esp, 0x18
ret 4
mov ecx, dword [esp + 0x18]
xor eax, eax
mov dword [0x54fd74], 0x63
or dword [esi + 8], 2
pop esi
xor ecx, esp
call fcn.004f9e32
add esp, 0x18
ret 4
Function at 0x4d8da0
Capabilities:
Get hostname
Send data
Send data on socket

Disassembly:
sub esp, 0x20
mov eax, dword [0x551e00]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x30]
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x14], ebp
call fcn.004d8a10
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4d8dc6
sub ecx, edx
xor ebp, ebp
inc ecx
push 0x100
mov dword [esp + 0x14], ecx
call fcn.004d5270
mov esi, eax
add esp, 4
test esi, esi
je 0x4d8e15
push 0x100
push esi
call sub.WS2_32.dll_gethostname
cmp eax, 0xffffffff
je 0x4d8e0c
mov ecx, esi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4d8e00
sub ecx, edx
lea ebp, [ecx + 1]
push esi
call fcn.004f948a
add esp, 4
mov esi, dword [esp + 0x10]
push 0x12c
lea eax, [esi + 0x20]
add eax, ebp
push eax
push 0x12
mov dword [esp + 0x24], eax
call fcn.004d54b0
mov edi, eax
test edi, edi
je 0x4d8f13
mov eax, dword [esp + 0x34]
xorps xmm0, xmm0
movdqu xmmword [edi + 8], xmm0
movq qword [edi + 0x18], xmm0
test eax, eax
je 0x4d8e8a
mov esi, dword [eax]
mov eax, dword [0x54fd78]
and esi, 1
and eax, 0xe00000
or esi, eax
call fcn.004d75b0
mov ecx, dword [esp + 0x34]
movzx eax, al
shl eax, 0x18
or eax, esi
mov esi, dword [esp + 0x10]
mov dword [edi + 8], eax
mov eax, dword [ecx + 4]
mov dword [edi + 0xc], eax
mov eax, dword [ecx + 8]
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [edi + 0x1c], eax
push esi
push dword [esp + 0x18]
lea eax, [edi + 0x20]
mov dword [edi + 0x14], esi
push eax
mov dword [edi + 0x18], ebp
call fcn.004fa290
add esp, 0xc
lea eax, [esi + 0x20]
add eax, edi
push ebp
push eax
call fcn.004d7ba0
mov esi, dword [0x55bccc]
test esi, esi
je 0x4d8f13
mov ebp, dword [esp + 0x18]
mov eax, 2
mov word [esp + 0x1c], ax
mov eax, dword [esi + 4]
test eax, eax
je 0x4d8f04
mov dword [esp + 0x20], eax
movzx eax, word [0x559f38]
push eax
call sub.WS2_32.dll_htons
push 0x10
mov word [esp + 0x22], ax
lea eax, [esp + 0x20]
push eax
push 0
push ebp
push edi
push dword [0x54fed8]
call sub.WS2_32.dll_sendto
xor ebx, ebx
cmp eax, 0xffffffff
setne bl
test ebx, ebx
je 0x4d8f13
mov esi, dword [esi]
mov eax, 2
test esi, esi
jne 0x4d8ec0
test ebx, ebx
jne 0x4d8f30
cmp dword [0x54fd74], 0
jne 0x4d8f30
mov dword [0x559f10], 0
mov dword [0x54fd74], 0x61
push edi
call fcn.004f948a
mov ecx, dword [esp + 0x30]
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004f9e32
add esp, 0x20
ret 0xc

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

Disassembly:
mov ecx, dword [esp + 8]
push 0
movzx eax, word [ecx + 2]
push eax
mov eax, dword [esp + 0xc]
push ecx
push dword [eax + 4]
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x4d8f7c
mov dword [0x54fd74], 0x61
xor eax, eax
ret 8
mov eax, 1
ret 8