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

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
mov eax, 0x58bf
mov dword [esp + 0x14], ecx
xor ebp, ebp
mov dword [esp + 0x1c], 0xce6dd971
push edi
mov dword [esp + 0x26], ebp
mov word [esp + 0x24], ax
call fcn.0040e794
mov cl, byte [esp + 0x34]
mov bl, 0xf
add cl, 5
mov byte [esp + 0x13], al
and cl, 0xf
sub bl, cl
call fcn.0040e794
mov edx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
shl al, 4
or al, bl
mov dword [esp + 0x1c], eax
movzx eax, bl
mov ebx, dword [esp + 0x34]
push ebx
push dword [esp + 0x34]
mov dword [esp + 0x1c], eax
lea ecx, [ebx + 6]
add ecx, eax
mov dword [edx], ecx
lea ecx, [edi + 6]
add ecx, eax
push ecx
cmp dword [esp + 0x3c], edi
jne 0x401aa6
call fcn.004268d0
jmp 0x401aab
call fcn.004268d0
mov eax, dword [esp + 0x28]
add esp, 0xc
mov cl, byte [esp + 0x13]
mov esi, ebp
mov byte [edi + 5], al
mov eax, dword [esp + 0x14]
mov byte [edi + 4], cl
test eax, eax
je 0x401ade
mov ebx, eax
call fcn.0040e794
mov byte [edi + esi + 6], al
inc esi
cmp esi, ebx
jb 0x401ac8
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
add ebx, 2
lea ecx, [esp + 0x20]
add eax, ebx
push eax
lea eax, [edi + 4]
push eax
call fcn.004018c1
mov eax, dword [esp + 0x26]
push edi
mov dword [edi], eax
mov eax, dword [esp + 0x1c]
push 0x10
push edi
push eax
lea ebx, [eax + 0x234]
push ebx
call fcn.00412d96
mov eax, dword [esp + 0x50]
add esp, 0x14
mov esi, dword [eax]
sub esi, 0x10
cmp esi, 0x10
jb 0x401b4f
add edi, esi
push 0x10
mov ecx, edi
sub ebp, esi
pop edx
mov al, byte [ecx + ebp]
xor byte [ecx], al
inc ecx
sub edx, 1
jne 0x401b26
push edi
push 0x10
push edi
push dword [esp + 0x24]
push ebx
call fcn.00412d96
mov ebp, esi
add esp, 0x14
sub esi, 0x10
sub edi, 0x10
cmp esi, 0x10
jae 0x401b1f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x10
Function at 0x403254
Capabilities:
Create udp socket
Initialize winsock library
Set socket configuration

Disassembly:
mov eax, 0x447c65
call fcn.00425528
sub esp, 0x198
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x14], esi
xor eax, eax
lea ebx, [esi + 0x14]
mov dword [ebx], eax
mov dword [ebp - 4], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], 0xf
mov byte [ebx], al
lea eax, [ebp - 0x1a4]
mov byte [ebp - 4], 1
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x403352
push 0x11
push 2
pop eax
push eax
push eax
call sub.WS2_32.dll_socket
xor ecx, ecx
mov dword [esi], eax
inc ecx
cmp eax, ecx
jge 0x4032d1
push str.Failed_to_create_socket._n
push 0x52caa0
call fcn.004029b1
pop ecx
pop ecx
and dword [esi], 0
call sub.WS2_32.dll_WSACleanup
jmp 0x403352
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x10]
push ecx
push 0x8004667e
push eax
call sub.WS2_32.dll_ioctlsocket
test eax, eax
jns 0x403301
push str.Failed_to_set_socket_to_non_blocking._n
push 0x52caa0
call fcn.004029b1
pop ecx
pop ecx
push dword [esi]
call sub.WS2_32.dll_closesocket
jmp 0x4032c4
push edi
xor eax, eax
lea edi, [esi + 4]
stosd dword es:[edi], eax
push 2
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [ebp + 0x20]
pop eax
push edi
mov word [esi + 4], ax
call sub.WS2_32.dll_htons
cmp dword [ebp + 0x1c], 0x10
mov word [esi + 6], ax
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
call sub.WS2_32.dll_inet_addr
mov dword [esi + 8], eax
lea eax, [ebp + 8]
cmp ebx, eax
je 0x40334d
cmp dword [ebp + 0x1c], 0x10
mov ecx, ebx
push dword [ebp + 0x18]
cmovae eax, dword [ebp + 8]
push eax
call fcn.004048fd
mov word [esi + 0x2c], di
pop edi
lea ecx, [ebp + 8]
call fcn.00404849
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x1c
Function at 0x404011
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
mov eax, 0x447d58
call fcn.00425528
sub esp, 0x238
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x1c], esi
cmp dword [esi], 1
jge 0x40405e
mov esi, dword [ebp + 8]
mov ecx, ebx
mov dword [esi], ebx
lea edx, [ecx + 1]
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], 0xf
mov byte [esi], bl
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404045
sub ecx, edx
push ecx
push ebx
mov ecx, esi
call fcn.004048fd
mov eax, esi
jmp 0x4041bf
mov dword [ebp - 0x34], ebx
push edi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], bl
push 0x200
lea eax, [ebp - 0x244]
mov dword [ebp - 4], ebx
push ebx
push eax
call fcn.00426e50
add esp, 0xc
mov dword [ebp - 0x14], 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
mov eax, dword [ebp + 0xc]
cdq
mov dword [ebp - 0x10], eax
mov dword [ebp + 0xc], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ecx, ecx
sub eax, edi
sbb ecx, ebx
cmp ecx, dword [ebp + 0xc]
ja 0x404178
jae 0x40416f
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x44]
push eax
push ebx
push 0x200
lea eax, [ebp - 0x244]
push eax
push dword [esi]
call sub.WS2_32.dll_recvfrom
mov dword [ebp - 0x18], eax
cmp eax, 0xb
jle 0x404158
cmp dword [ebp - 0x24], 0
jbe 0x4040f4
push 1
push 0x449bf0
lea ecx, [ebp - 0x34]
call fcn.00404885
push 0xb
mov edi, ebx
pop esi
mov cl, byte [ebp + esi - 0x244]
cmp cl, 0x20
jl 0x40410a
cmp cl, 0x7e
jle 0x404120
test edi, edi
jne 0x404120
push 1
push 0x449bf0
lea ecx, [ebp - 0x34]
inc edi
call fcn.00404885
jmp 0x404132
lea eax, [ecx - 0x20]
cmp al, 0x5e
ja 0x404132
push ecx
lea ecx, [ebp - 0x34]
mov edi, ebx
call fcn.00404dad
inc esi
cmp esi, dword [ebp - 0x18]
jl 0x4040f9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x200
mov edi, eax
lea eax, [ebp - 0x244]
push ebx
push eax
call fcn.00426e50
mov esi, dword [ebp - 0x1c]
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ecx, ecx
sub eax, edi
sbb ecx, ebx
cmp ecx, dword [ebp + 0xc]
jb 0x4040bb
ja 0x404178
cmp eax, dword [ebp - 0x10]
jb 0x4040bb
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x34]
push eax
call fcn.004030e0
mov eax, dword [ebp - 0x20]
pop edi
cmp eax, 0x10
jb 0x4041bc
mov ecx, dword [ebp - 0x34]
inc eax
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x10], ecx
cmp eax, 0x1000
jb 0x4041b3
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0040425f
mov eax, dword [ebp + 0xc]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x10]
push eax
push ecx
call fcn.00425577
pop ecx
pop ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x4041cf
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, 0x447d3f
call fcn.00425528
sub esp, 0x1c
push esi
push edi
mov esi, ecx
xor edi, edi
cmp dword [esi], 1
mov dword [ebp - 4], edi
jge 0x4041ef
or esi, 0xffffffff
jmp 0x404245
sub esp, 0x18
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
mov dword [ecx], edi
mov dword [ecx + 0x10], edi
mov dword [ecx + 0x14], edi
call fcn.004042b2
push dword [ebp + 8]
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.00403d81
cmp dword [ebp - 0x18], 4
jae 0x40421e
or esi, 0xffffffff
jmp 0x40423d
cmp dword [ebp - 0x14], 0x10
lea eax, [esi + 4]
push 0x10
push eax
push edi
push dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
push ecx
push dword [esi]
call sub.WS2_32.dll_sendto
mov esi, eax
lea ecx, [ebp - 0x28]
call fcn.00404849
lea ecx, [ebp + 0xc]
call fcn.00404849
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
mov dword fs:[0], ecx
pop esi
leave
ret 0x1c
Function at 0x40d7d1
Capabilities:
Encode data using xor

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x44814a
call fcn.00425528
sub esp, 0x18c
push ebx
push esi
mov ebx, ecx
lea ecx, [ebp - 0x198]
push edi
call fcn.0040e6d3
mov edx, dword [ebp + 0x64]
and dword [ebp - 4], 0
cmp dword [edx + 0x7ee], 4
jne 0x40d91b
cmp byte [ebx + 0x98c], 1
lea edi, [ebp]
mov eax, dword [ebp + 0x68]
push 8
mov ecx, dword [eax + 0x15]
lea esi, [eax + 0x19]
mov dword [ebp + 0x54], ecx
mov dword [ebp + 0x58], ecx
pop ecx
rep movsd dword es:[edi], dword [esi]
jne 0x40d85e
cmp byte [ebx + 0x98b], 0
jne 0x40d85e
lea eax, [ebp + 0x58]
mov eax, dword [eax]
cmp eax, dword [ebx + 0x967]
jne 0x40d92f
lea edx, [ebp]
xor ecx, ecx
mov eax, dword [edx + ecx*4]
cmp eax, dword [ebx + ecx*4 + 0x96b]
jne 0x40d92f
inc ecx
cmp ecx, 8
jne 0x40d848
xor esi, esi
call fcn.0040e794
mov dword [ebp + esi + 0x40], eax
add esi, 4
cmp esi, 0x14
jl 0x40d860
and dword [ebp + 0x3c], 0
lea eax, [ebp]
push 5
pop ecx
xorps xmm0, xmm0
lea esi, [ebp + 0x40]
movlpd qword [ebp + 0x34], xmm0
lea edi, [ebp + 0x20]
push eax
push dword [ebp + 0x54]
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x198]
call fcn.0040e70e
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp - 0x198]
call fcn.0040e63f
mov esi, dword [ebp + 0x68]
xor edx, edx
mov ecx, dword [ebp + 0x64]
inc esi
mov al, byte [esi + edx]
xor al, byte [ebp + edx + 0x40]
mov byte [ecx + edx + 0x7d1], al
inc edx
cmp edx, 0x10
jl 0x40d8b6
mov byte [ecx + 0x7e1], 1
lea edi, [ebp - 0x43]
push 5
pop ecx
mov byte [ebp - 0x44], 0x10
rep movsd dword es:[edi], dword [esi]
push 8
pop ecx
lea esi, [ebp - 0x64]
lea edi, [ebp - 0x2f]
rep movsd dword es:[edi], dword [esi]
call fcn.00402446
mov edx, dword [ebp + 0x64]
xor esi, esi
push esi
push eax
push esi
mov eax, dword [edx + 1]
push esi
push ecx
push ecx
mov ecx, esp
push esi
push 6
push esi
mov dword [ecx], eax
mov ax, word [edx + 5]
mov word [ecx + 4], ax
lea eax, [ebp - 0x44]
push 0x1a8
push eax
mov ecx, ebx
call fcn.0040dd6e
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add ebp, 0x5c
leave
ret 8
push 1
call fcn.004094c2
mov edi, dword [ebp + 0x64]
mov esi, eax
pop ecx
push 1
mov ecx, dword [esi + 0x10]
mov byte [ecx], 0x1c
mov dword [esi + 0xc], 8
mov ecx, dword [edi + 1]
push ecx
mov dword [esi + 2], ecx
mov ax, word [edi + 5]
push ecx
mov ecx, esp
mov word [esi + 6], ax
mov eax, dword [esi + 2]
mov dword [ecx], eax
mov ax, word [esi + 6]
mov word [ecx + 4], ax
mov ecx, ebx
call fcn.0040a2ae
push esi
mov ecx, ebx
mov word [esi], ax
call fcn.00409229
mov dword [edi + 0x7ee], 2
jmp 0x40d91b
Function at 0x40e794
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub dword [0x45ddcc], 1
js 0x40e7d7
mov eax, dword [0x483aa4]
mov ecx, dword [eax]
add eax, 4
mov dword [0x483aa4], eax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
ret
cmp dword [0x45ddcc], 0xffffffff
push ebx
push ebp
push esi
mov ebx, 0x4830e0
mov esi, 0x4830e8
push edi
mov edi, ebx
jge 0x40e7fb
push 0x1105
call fcn.0040e8e6
pop ecx
mov eax, dword [0x4830e0]
mov ebp, 0xe3
mov edx, dword [0x4830e4]
mov dword [0x45ddcc], 0x26f
mov dword [0x483aa4], 0x4830e4
mov ecx, edx
xor ecx, eax
and ecx, 0x7ffffffe
xor ecx, eax
mov eax, edx
and al, 1
shr ecx, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
mov eax, edx
xor ecx, dword [esi + 0x62c]
mov dword [edi], ecx
add edi, 4
mov edx, dword [esi]
add esi, 4
sub ebp, 1
jne 0x40e81f
mov ebp, 0x18c
mov ecx, edx
xor ecx, eax
and ecx, 0x7ffffffe
xor ecx, eax
mov eax, edx
and al, 1
shr ecx, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
mov eax, edx
xor ecx, dword [ebx]
lea ebx, [ebx + 4]
mov dword [edi], ecx
lea edi, [edi + 4]
mov edx, dword [esi]
lea esi, [esi + 4]
sub ebp, 1
jne 0x40e85b
mov edx, dword [0x4830e0]
mov ecx, edx
xor ecx, eax
and ecx, 0x7ffffffe
xor ecx, eax
mov eax, edx
and al, 1
shr ecx, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
mov eax, edx
xor ecx, dword [ebx]
shr eax, 0xb
xor edx, eax
mov dword [edi], ecx
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
pop edi
pop esi
mov eax, edx
shr eax, 0x12
pop ebp
xor eax, edx
pop ebx
ret

Function at 0x412998
Capabilities:
Encode data using xor

Disassembly:
push edi
movzx edi, byte [esp + 0xc]
test edi, edi
je 0x4129e1
push esi
mov esi, dword [esp + 0xc]
add esi, 2
movzx eax, byte [esi + 1]
movzx ecx, byte [esi - 1]
mov edx, dword [eax*4 + 0x460ef8]
movzx eax, byte [esi]
lea esi, [esi + 4]
xor edx, dword [ecx*4 + 0x4606f8]
xor edx, dword [eax*4 + 0x460af8]
movzx eax, byte [esi - 6]
xor edx, dword [eax*4 + 0x4602f8]
mov dword [esi - 6], edx
sub edi, 1
jne 0x4129aa
pop esi
pop edi
ret
Function at 0x413a24
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x24
push ebx
push ebp
mov ebp, dword [0x483aa8]
push esi
push edi
lea edi, [ebp - 6]
lea ecx, [edi - 1]
test ecx, ecx
js 0x413a97
mov eax, dword [edx + ecx*4]
mov dword [esp + ecx*4 + 0x14], eax
sub ecx, 1
jns 0x413a3f
xor esi, esi
xor edx, edx
xor ebx, ebx
lea eax, [ebp + 1]
cmp esi, eax
jge 0x413a9b
cmp ebx, edi
jge 0x413a7c
mov ebp, dword [esp + 0x40]
cmp edx, 4
jge 0x413a76
mov eax, dword [esp + ebx*4 + 0x14]
lea ecx, [edx + esi*4]
inc ebx
mov dword [ebp + ecx*4], eax
inc edx
cmp ebx, edi
jl 0x413a60
mov ebp, dword [0x483aa8]
cmp edx, 4
lea eax, [esi + 1]
cmovne eax, esi
mov esi, eax
xor eax, eax
cmp edx, 4
cmovne eax, edx
mov edx, eax
cmp ebx, edi
jl 0x413a51
jmp 0x413a9b
xor esi, esi
xor edx, edx
lea eax, [ebp + 1]
cmp esi, eax
jge 0x413bcf
mov ebx, 0x4612f8
movzx eax, byte [esp + edi*4 + 0x11]
mov cl, byte [esp + 0x14]
xor cl, byte [eax + str.cw]
mov byte [esp + 0x14], cl
movzx eax, byte [esp + edi*4 + 0x12]
mov al, byte [eax + str.cw]
xor byte [esp + 0x15], al
movzx eax, byte [esp + edi*4 + 0x13]
mov al, byte [eax + str.cw]
xor byte [esp + 0x16], al
movzx eax, byte [esp + edi*4 + 0x10]
mov al, byte [eax + str.cw]
xor byte [esp + 0x17], al
mov al, byte [ebx]
add ebx, 4
xor al, cl
mov dword [esp + 0x10], ebx
xor ecx, ecx
mov byte [esp + 0x14], al
inc ecx
cmp edi, 8
je 0x413b1f
cmp edi, ecx
jle 0x413b15
mov eax, dword [esp + ecx*4 + 0x10]
xor dword [esp + ecx*4 + 0x14], eax
inc ecx
cmp ecx, edi
jl 0x413b06
jmp 0x413b7a
test edi, edi
jle 0x413bc4
jmp 0x413b7a
mov eax, dword [esp + ecx*4 + 0x10]
xor dword [esp + ecx*4 + 0x14], eax
inc ecx
cmp ecx, 4
jl 0x413b1f
movzx eax, byte [esp + 0x20]
push 5
pop ecx
mov al, byte [eax + str.cw]
xor byte [esp + 0x24], al
movzx eax, byte [esp + 0x21]
mov al, byte [eax + str.cw]
xor byte [esp + 0x25], al
movzx eax, byte [esp + 0x22]
mov al, byte [eax + str.cw]
xor byte [esp + 0x26], al
movzx eax, byte [esp + 0x23]
mov al, byte [eax + str.cw]
xor byte [esp + 0x27], al
mov eax, dword [esp + ecx*4 + 0x10]
xor dword [esp + ecx*4 + 0x14], eax
inc ecx
cmp ecx, 8
jl 0x413b6c
xor ebx, ebx
lea eax, [ebp + 1]
cmp esi, eax
jge 0x413bc0
cmp ebx, edi
jge 0x413ba7
mov ebp, dword [esp + 0x40]
cmp edx, 4
jge 0x413ba1
mov eax, dword [esp + ebx*4 + 0x14]
lea ecx, [edx + esi*4]
inc ebx
mov dword [ebp + ecx*4], eax
inc edx
cmp ebx, edi
jl 0x413b8b
mov ebp, dword [0x483aa8]
cmp edx, 4
lea eax, [esi + 1]
cmovne eax, esi
mov esi, eax
xor eax, eax
cmp edx, 4
cmovne eax, edx
mov edx, eax
cmp ebx, edi
jl 0x413b7c
mov ebx, dword [esp + 0x10]
lea eax, [ebp + 1]
cmp esi, eax
jl 0x413aab
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
Function at 0x413d73
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0x10]
xor ebx, ebx
mov dl, bl
mov ecx, ebx
push edi
mov edi, dword [esp + 0x10]
test esi, esi
jle 0x413d94
mov al, byte [ecx + edi]
and al, 0x55
xor dl, al
inc ecx
cmp ecx, esi
jl 0x413d88
push esi
push edi
push 0x483ab1
mov byte [0x483ab0], dl
call fcn.004268d0
add esp, 0xc
test esi, esi
jle 0x413ddc
mov ecx, dword [esp + 0x1c]
movzx eax, byte [ebx + 0x483ab1]
mov al, byte [eax + 0x4815b0]
mov byte [ebx + 0x483ab1], al
test ecx, ecx
je 0x413dd4
xor al, byte [esp + 0x18]
xor al, 0xaa
mov byte [ebx + 0x483ab1], al
xor ecx, 1
inc ebx
cmp ebx, esi
jl 0x413db1
pop edi
pop esi
pop ebx
ret

Function at 0x413df2
Capabilities:
Hash data using sha1

Disassembly:
mov dword [ecx], vtable.CSHA1.0
jmp fcn.00413ef3

Function at 0x413ef3
Capabilities:
Hash data using sha1

Disassembly:
and dword [ecx + 0x18], 0
and dword [ecx + 0x1c], 0
mov dword [ecx + 4], 0x67452301
mov dword [ecx + 8], 0xefcdab89
mov dword [ecx + 0xc], 0x98badcfe
mov dword [ecx + 0x10], 0x10325476
mov dword [ecx + 0x14], 0xc3d2e1f0
ret
Function at 0x415221
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp byte [0x4a6ab0], 0
push edi
mov edi, ecx
jne 0x41528a
push 0x4a6ab8
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x415283
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov esi, eax
push ecx
push ecx
lea eax, [ebp - 4]
push eax
push 0x400
push esi
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [ebp - 4]
push esi
push str.WSAStartup_failed:Error_code____d_n_s
call fcn.00401872
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
mov byte [0x4a6ab0], 1
mov eax, edi
pop edi
leave
ret
Function at 0x4152a6
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 2
pop eax
push eax
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x415305
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push ebx
mov esi, eax
lea eax, [esp + 0x34]
push eax
push 0x400
push esi
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0x2c]
push esi
push str.socket_...__failed:Error_code____d_n_s
call fcn.00401872
add esp, 0xc
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
or eax, edi
jmp 0x41549c
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0xc]
push ebp
push 4
push eax
push 4
mov esi, 0xffff
mov dword [esp + 0x1c], 1
push esi
push edi
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xffffffff
jne 0x415371
call ebp
xor ecx, ecx
mov esi, eax
push ecx
push ecx
lea eax, [esp + 0x1c]
push eax
push 0x400
push esi
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0x14]
push esi
push str.setsockopt_SO_REUSEADDR__failed:Error_code____d_n_s
call fcn.00401872
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, 0xffff
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x40000
push eax
push 0x1002
push esi
push edi
call ebx
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x4000
push eax
push 0x1001
push esi
push edi
call ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x415494
push 4
lea eax, [esp + 0x14]
push eax
push 0x20
push esi
push edi
call ebx
cmp eax, 0xffffffff
jne 0x415411
call ebp
xor ebx, ebx
mov esi, eax
push ebx
push ebx
lea eax, [esp + 0x1c]
push eax
push 0x400
push esi
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0x14]
push esi
push str.setsockopt_SO_BROADCAST__failed:Error_code____d_n_s
call fcn.00401872
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x415413
xor ebx, ebx
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1e], ax
push 2
pop eax
mov word [esp + 0x1c], ax
mov eax, dword [esp + 0x38]
test eax, eax
je 0x415444
cmp byte [eax], 0
je 0x415444
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x20], eax
jmp 0x415448
mov dword [esp + 0x20], ebx
push 0x10
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x415499
call ebp
push ebx
push ebx
mov esi, eax
lea eax, [esp + 0x38]
push eax
push 0x400
push esi
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0x30]
push esi
push str.bind_...__failed:Error_code____d_n_s
call fcn.00401872
add esp, 0xc
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_LocalFree]
or eax, 0xffffffff
jmp 0x41549b
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret 0xc
Function at 0x4154a5
Capabilities:
Resolve dns

Disassembly:
push dword [esp + 4]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4154c6
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x4154c6
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
jmp 0x4154c8
xor eax, eax
ret 4

Function at 0x4154fe
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x50
lea eax, [esp]
push esi
push edi
push 0x50
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x415558
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov esi, eax
push edi
push edi
lea eax, [esp + 0x64]
push eax
push 0x400
push esi
push edi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0x5c]
push esi
push str.gethostname_failed:Error_code____d_n_s
call fcn.00401872
add esp, 0xc
push dword [esp + 0x5c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4155e9
push ebx
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
jne 0x4155ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov esi, eax
push edi
push edi
lea eax, [esp + 0x68]
push eax
push 0x400
push esi
push edi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0x60]
push esi
push str.gethostbyname_failed:Error_code____d_n_s
call fcn.00401872
add esp, 0xc
push dword [esp + 0x60]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4155e8
mov eax, dword [ebx + 0xc]
xor edi, edi
cmp dword [eax], edi
je 0x4155e8
push ebp
mov ebp, dword [esp + 0x64]
mov esi, edi
cmp esi, 0x28
jge 0x4155e7
mov eax, dword [esi + eax]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, ebp
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4155cf
mov eax, dword [ebx + 0xc]
add esi, 4
add ebp, 0x10
cmp dword [esi + eax], edi
jne 0x4155bb
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x50
ret 4