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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [eax]
mov ebx, dword [eax + 4]
mov eax, edi
or eax, ebx
mov dword [ebp - 8], edx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
je 0x4f4f35
mov eax, edi
xor esi, esi
and eax, 1
mov dword [ebp - 0xc], esi
or eax, esi
jne 0x4f4e37
inc esi
xor edx, edx
xor ecx, ecx
mov eax, esi
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, edi
and ecx, ebx
or edx, ecx
je 0x4f4e14
mov dword [ebp - 0xc], esi
and dword [ebp - 4], 0
xor edx, edx
mov eax, dword [ebp - 8]
xor ecx, ecx
dec eax
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, edi
and ecx, ebx
or edx, ecx
jne 0x4f4e84
mov esi, eax
inc dword [ebp - 4]
xor edx, edx
dec esi
xor ecx, ecx
mov eax, esi
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
and edx, edi
and ecx, ebx
or edx, ecx
je 0x4f4e5e
mov esi, dword [ebp - 0xc]
sub esi, dword [ebp - 4]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x14], eax
test eax, eax
jle 0x4f4f35
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 4]
and dword [ebp - 0xc], 0
push ecx
push dword [ebp + 0xc]
mov eax, dword [eax + 0x20]
push dword [ebp + 8]
push eax
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4f4f37
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
add edi, dword [ebp - 8]
mov ecx, dword [eax + 0x20]
mov eax, dword [ebp - 4]
mov dword [eax], ecx
cmp dword [ebp - 0xc], edi
jge 0x4f4ef5
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call dword [ebx + 0x14]
mov esi, eax
add esp, 0x18
test esi, esi
je 0x4f4ecd
push dword [ebp - 4]
call dword [ebx + 0x10]
mov edi, dword [ebp - 0x18]
pop ecx
test esi, esi
je 0x4f4f0c
cmp esi, 0x65
je 0x4f4f0c
mov eax, esi
jmp 0x4f4f37
xor ecx, ecx
cmp esi, 0x65
sete cl
sub ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
test ecx, ecx
jle 0x4f4f35
mov esi, dword [ebp + 0x10]
mov eax, edi
mov edx, dword [ebp - 0x1c]
add dword [esi], ecx
call fcn.00552ba0
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov dword [ecx + 4], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4f69a0
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x2c], ecx
mov edx, dword [ecx + 0x1c]
xor ebx, ebx
push edi
sub edx, 6
xor edi, edi
mov dword [ebp - 0x30], edi
test edx, edx
jle 0x4f69d5
mov ecx, edx
lea edi, [ebp - 0x24]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x2c]
mov edi, ebx
xor esi, esi
test edx, edx
jle 0x4f6a29
push 8
pop eax
mov dword [ebp - 0x28], eax
cmp edi, dword [ecx + 0x1c]
ja 0x4f6b4a
cmp esi, edx
jge 0x4f6a15
mov edi, dword [ebp - 0x28]
cmp ebx, 4
jge 0x4f6a0c
mov eax, dword [ebp + esi*4 - 0x24]
lea ecx, [edi + ebx]
mov edi, dword [ebp - 0x2c]
inc esi
inc ebx
mov dword [edi + ecx*4], eax
mov edi, dword [ebp - 0x28]
cmp esi, edx
jl 0x4f69f1
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
cmp ebx, 4
jne 0x4f6a25
inc edi
add eax, ebx
mov dword [ebp - 0x30], edi
xor ebx, ebx
mov dword [ebp - 0x28], eax
cmp esi, edx
jl 0x4f69e1
cmp edi, dword [ecx + 0x1c]
ja 0x4f6b4a
mov esi, 0x5778c0
movzx eax, byte [ebp + edx*4 - 0x27]
mov cl, byte [ebp - 0x24]
xor cl, byte [eax + 0x57aa80]
mov byte [ebp - 0x24], cl
xor ecx, ecx
movzx eax, byte [ebp + edx*4 - 0x26]
inc ecx
mov al, byte [eax + 0x57aa80]
xor byte [ebp - 0x23], al
movzx eax, byte [ebp + edx*4 - 0x25]
mov al, byte [eax + 0x57aa80]
xor byte [ebp - 0x22], al
movzx eax, byte [ebp + edx*4 - 0x28]
mov al, byte [eax + 0x57aa80]
xor byte [ebp - 0x21], al
mov al, byte [esi]
add esi, 4
xor byte [ebp - 0x24], al
mov dword [ebp - 0x34], esi
cmp edx, 8
je 0x4f6a98
cmp edx, ecx
jle 0x4f6aeb
mov eax, dword [ebp + ecx*4 - 0x28]
xor dword [ebp + ecx*4 - 0x24], eax
inc ecx
cmp ecx, edx
jl 0x4f6a89
jmp 0x4f6aeb
mov eax, dword [ebp + ecx*4 - 0x28]
xor dword [ebp + ecx*4 - 0x24], eax
inc ecx
cmp ecx, 4
jl 0x4f6a98
movzx eax, byte [ebp - 0x18]
push 5
pop ecx
mov al, byte [eax + 0x57aa80]
xor byte [ebp - 0x14], al
movzx eax, byte [ebp - 0x17]
mov al, byte [eax + 0x57aa80]
xor byte [ebp - 0x13], al
movzx eax, byte [ebp - 0x16]
mov al, byte [eax + 0x57aa80]
xor byte [ebp - 0x12], al
movzx eax, byte [ebp - 0x15]
mov al, byte [eax + 0x57aa80]
xor byte [ebp - 0x11], al
mov eax, dword [ebp + ecx*4 - 0x28]
xor dword [ebp + ecx*4 - 0x24], eax
inc ecx
cmp ecx, 8
jl 0x4f6add
xor esi, esi
test edx, edx
jle 0x4f6b3b
mov eax, dword [ebp - 0x2c]
lea ecx, [edi*4 + 8]
mov dword [ebp - 0x28], ecx
cmp edi, dword [eax + 0x1c]
ja 0x4f6b3b
cmp esi, edx
jge 0x4f6b27
mov edi, dword [ebp - 0x2c]
cmp ebx, 4
jge 0x4f6b21
mov eax, dword [ebp + esi*4 - 0x24]
add ecx, ebx
inc esi
inc ebx
mov dword [edi + ecx*4], eax
mov ecx, dword [ebp - 0x28]
cmp esi, edx
jl 0x4f6b0a
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
cmp ebx, 4
jne 0x4f6b37
inc edi
add ecx, ebx
mov dword [ebp - 0x30], edi
xor ebx, ebx
mov dword [ebp - 0x28], ecx
cmp esi, edx
jl 0x4f6afe
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x34]
cmp edi, dword [eax + 0x1c]
jbe 0x4f6a37
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret
Function at 0x4f6b5b
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
mov edi, ecx
xor ebx, ebx
inc ebx
cmp dword [edi + 0x1c], ebx
jbe 0x4f6c38
push esi
lea esi, [edi + 0x32]
movzx eax, byte [esi + 1]
movzx ecx, byte [esi - 1]
mov edx, dword [eax*4 + 0x5b43c0]
xor edx, dword [ecx*4 + 0x5b4ef0]
movzx eax, byte [esi]
lea esi, [esi + 0x10]
xor edx, dword [eax*4 + 0x5b3fc0]
movzx eax, byte [esi - 0x12]
xor edx, dword [eax*4 + 0x5b6840]
mov dword [esi - 0x12], edx
movzx eax, byte [esi - 0xb]
movzx ecx, byte [esi - 0xc]
mov edx, dword [eax*4 + 0x5b43c0]
xor edx, dword [ecx*4 + 0x5b3fc0]
movzx eax, byte [esi - 0xd]
xor edx, dword [eax*4 + 0x5b4ef0]
movzx eax, byte [esi - 0xe]
xor edx, dword [eax*4 + 0x5b6840]
mov dword [esi - 0xe], edx
movzx eax, byte [esi - 7]
movzx ecx, byte [esi - 8]
mov edx, dword [eax*4 + 0x5b43c0]
xor edx, dword [ecx*4 + 0x5b3fc0]
movzx eax, byte [esi - 9]
xor edx, dword [eax*4 + 0x5b4ef0]
movzx eax, byte [esi - 0xa]
xor edx, dword [eax*4 + 0x5b6840]
mov dword [esi - 0xa], edx
movzx eax, byte [esi - 3]
movzx ecx, byte [esi - 4]
mov edx, dword [eax*4 + 0x5b43c0]
movzx eax, byte [esi - 5]
xor edx, dword [ecx*4 + 0x5b3fc0]
xor edx, dword [eax*4 + 0x5b4ef0]
movzx eax, byte [esi - 6]
xor edx, dword [eax*4 + 0x5b6840]
inc ebx
mov dword [esi - 6], edx
cmp ebx, dword [edi + 0x1c]
jb 0x4f6b6f
pop esi
pop edi
pop ebx
ret
Function at 0x4f7469
Capabilities:
Hash data with md5

Disassembly:
and dword [ecx + 0x10], 0
and dword [ecx + 0x14], 0
mov dword [ecx], 0x67452301
mov dword [ecx + 4], 0xefcdab89
mov dword [ecx + 8], 0x98badcfe
mov dword [ecx + 0xc], 0x10325476
ret

Function at 0x4f7bd6
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x14]
push esi
xor esi, esi
mov dword [ebp - 0x108], edx
push edi
mov dword [ebp - 0x110], ebx
mov eax, esi
mov dword [ebp - 0x10c], esi
mov byte [ebp + eax - 0x104], al
inc eax
cmp eax, 0x100
jl 0x4f7c05
mov ebx, dword [ebp - 0x108]
mov edi, esi
mov edx, esi
movzx ecx, byte [ebp + edx - 0x104]
mov eax, edx
and eax, reloc.WS2_32.dll_ntohs
jns 0x4f7c34
dec eax
or eax, 0xfffffff0
inc eax
movzx eax, byte [eax + ebx]
add eax, ecx
add edi, eax
and edi, 0x800000ff
jns 0x4f7c4c
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [ebp + edi - 0x104]
mov byte [ebp + edx - 0x104], al
inc edx
mov byte [ebp + edi - 0x104], cl
cmp edx, 0x100
jl 0x4f7c1e
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x110]
sub edi, ebx
mov dword [ebp - 0x108], 0x20
inc esi
and esi, 0x800000ff
jns 0x4f7c90
dec esi
or esi, 0xffffff00
inc esi
movzx edx, byte [ebp + esi - 0x104]
mov ecx, dword [ebp - 0x10c]
add ecx, edx
and ecx, 0x800000ff
jns 0x4f7cb0
dec ecx
or ecx, 0xffffff00
inc ecx
mov al, byte [ebp + ecx - 0x104]
mov dword [ebp - 0x10c], ecx
mov byte [ebp + esi - 0x104], al
mov byte [ebp + ecx - 0x104], dl
movzx ecx, byte [ebp + esi - 0x104]
add ecx, edx
and ecx, 0x800000ff
jns 0x4f7ce5
dec ecx
or ecx, 0xffffff00
inc ecx
mov al, byte [ebp + ecx - 0x104]
xor al, byte [edi + ebx]
mov byte [ebx], al
inc ebx
dec dword [ebp - 0x108]
jne 0x4f7c7f
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret
Function at 0x4f7f53
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc4
mov eax, dword [0x5b31c8]
xor eax, esp
mov dword [esp + 0xc0], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov dword [esp + 8], eax
lea eax, [esp + 0xa8]
push edi
push eax
push dword [ebp + 8]
call fcn.004f7f03
lea eax, [esp + 0x84]
mov edx, 0x5708be
push eax
push 0
call fcn.004f7f03
lea ecx, [esp + 0x20]
call fcn.004f7469
push 0x20
lea edx, [esp + 0x90]
call fcn.004f748d
add esp, 0x14
lea edx, [esp + 0x10]
lea ecx, [esp + 0x6c]
call fcn.004f73d1
push 0x32
pop esi
lea ecx, [esp + 0x10]
call fcn.004f7469
push 0x10
lea edx, [esp + 0x70]
call fcn.004f748d
pop ecx
lea edx, [esp + 0x10]
lea ecx, [esp + 0x6c]
call fcn.004f73d1
dec esi
jne 0x4f7fc5
push 8
pop ecx
lea esi, [esp + 0xac]
xor ebx, ebx
lea edi, [esp + 0x7c]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov al, byte [esp + ecx + 0x6c]
xor al, bl
mov byte [esp + ecx + 0x9c], al
inc ecx
cmp ecx, 0x10
jl 0x4f7ffe
lea eax, [esp + 0x7c]
push eax
push ecx
push eax
push ecx
lea edx, [esp + 0xac]
call fcn.004f7bd6
add esp, 0x10
inc ebx
cmp ebx, 0x14
jl 0x4f7ffc
lea ecx, [esp + 0x10]
call fcn.004f7469
push 0x20
lea edx, [esp + 0xb0]
call fcn.004f748d
push 0x20
lea edx, [esp + 0x84]
lea ecx, [esp + 0x18]
call fcn.004f748d
pop ecx
pop ecx
lea edx, [esp + 0x10]
lea ecx, [esp + 0x6c]
call fcn.004f73d1
push 0x32
pop esi
lea ecx, [esp + 0x10]
call fcn.004f7469
push 0x10
lea edx, [esp + 0x70]
call fcn.004f748d
pop ecx
lea edx, [esp + 0x10]
lea ecx, [esp + 0x6c]
call fcn.004f73d1
dec esi
jne 0x4f8069
mov edi, dword [esp + 0xc]
lea esi, [esp + 0x6c]
mov ecx, dword [esp + 0xcc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0054e63c
mov esp, ebp
pop ebp
ret

Function at 0x4f882a
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x5bc474]
mov edx, eax
inc eax
mov dword [0x5bc474], eax
push ebx
mov ebx, ecx
test edx, edx
jne 0x4f88e1
mov eax, dword [sym.imp.MSVCR120.dll_malloc]
mov dword [0x5b6c40], eax
mov eax, dword [sym.imp.MSVCR120.dll_free]
mov dword [0x5b6c48], eax
mov eax, dword [sym.imp.MSVCR120.dll_realloc]
mov dword [0x5b6c4c], eax
mov eax, dword [sym.imp.MSVCR120.dll__strdup]
mov dword [0x5b6c44], eax
mov eax, dword [sym.imp.MSVCR120.dll_calloc]
mov dword [0x5b6c50], eax
test bl, 2
je 0x4f88be
lea eax, [ebp - 0x198]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4f88b9
mov eax, dword [ebp - 0x198]
cmp al, 2
jne 0x4f88b3
shr eax, 8
cmp al, 2
je 0x4f88be
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
jmp 0x4f88e3
push 0
mov dword [0x5bc42c], ebx
call dword [sym.imp.MSVCR120.dll__time64]
pop ecx
mov dword [0x5bc4d8], eax
call fcn.00500ca9
call fcn.00500ca9
call fcn.00500ca9
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret
Function at 0x4ff79d
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
cmp dword [edi + 0x1a4], 0
mov ebx, dword [edi]
jne 0x4ff8c0
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0x80
push eax
lea eax, [ebp - 0x88]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4ff80f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.005188fe
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.00500d35
add esp, 0x10
jmp 0x4ff8c7
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0x80
push eax
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4ff84c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.005188fe
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4ff801
lea eax, [edi + 0xcc]
push eax
lea edx, [edi + 0x9e]
lea ecx, [ebp - 0x88]
call fcn.004ff750
pop ecx
test eax, eax
jne 0x4ff886
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.005188fe
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x4ff801
lea eax, [edi + 0x100]
push eax
lea edx, [edi + 0xd0]
lea ecx, [ebp - 0x108]
call fcn.004ff750
pop ecx
test eax, eax
jne 0x4ff8c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.005188fe
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x4ff801
mov ecx, edi
call fcn.004ff703
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret

Function at 0x4ffab1
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
mov edi, ecx
push 4
mov esi, dword [edi]
mov eax, dword [esi + 0x314]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4ffafa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.005188fe
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00500cc1
add esp, 0xc
jmp 0x4ffb07
push str.TCP_NODELAY_set_n
push esi
call fcn.00500cc1
pop ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4ffff4
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ecx + 0x550]
push edi
or edi, 0xffffffff
cmp esi, edi
je 0x500043
mov eax, dword [ecx + 0x544]
mov eax, dword [eax]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x500043
test edx, edx
je 0x50001c
mov dword [edx], eax
cmp dword [eax + 0x150], 0
mov esi, dword [eax + 0x130]
jne 0x500043
push 2
push 1
lea ecx, [ebp - 1]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
cmove esi, edi
mov eax, esi
jmp 0x500045
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x500940
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x44
push 1
mov dword [ebp - 4], edx
mov esi, ecx
call dword [0x5b6c50]
pop ecx
pop ecx
mov edi, eax
mov dword [esi + 0x3c0], edi
push 8
pop ebx
test edi, edi
je 0x5009fb
mov eax, dword [ebp + 8]
xor ecx, ecx
mov edx, dword [ebp - 4]
mov dword [esi + 0x3b8], ecx
mov dword [esi + 0x3bc], ecx
mov dword [esi + 0x3b4], ecx
mov dword [esi + 0x3b0], eax
mov dword [edi], ecx
lea ecx, [edi + 0xc]
push ecx
push eax
call fcn.005007e6
pop ecx
pop ecx
test eax, eax
je 0x5009fb
mov eax, dword [esi + 0x3ac]
test eax, eax
je 0x5009b6
push eax
call dword [0x5b6c48]
and dword [esi + 0x3ac], 0
pop ecx
push dword [ebp - 4]
call dword [0x5b6c44]
mov dword [esi + 0x3ac], eax
pop ecx
test eax, eax
je 0x5009fb
xor ebx, ebx
lea eax, [edi + 0xc]
push ebx
push ebx
push eax
push 0x500873
push ebx
push ebx
call dword [sym.imp.MSVCR120.dll__beginthreadex]
add esp, 0x18
test eax, eax
je 0x5009eb
cmp eax, 0xffffffff
jne 0x5009ed
mov eax, ebx
mov dword [edi], eax
test eax, eax
jne 0x500a16
call dword [sym.imp.MSVCR120.dll__errno]
mov ebx, dword [eax]
lea ecx, [esi + 0x3ac]
call fcn.005008ff
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
inc eax
jmp 0x500a0f

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebx + eax*4 + 0x130]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp + 0x18]
mov esi, eax
and dword [edi], 0
cmp esi, 0xffffffff
jne 0x500f4b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 8], eax
cmp eax, 0x2733
jne 0x500f21
xor esi, esi
mov dword [edi], 0x51
jmp 0x500f4b
mov edx, eax
mov ecx, ebx
call fcn.005188fe
push eax
push str.Send_failure:__s
push dword [ebx]
call fcn.00500d35
mov eax, dword [ebx]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [eax + 0x858c], ecx
mov dword [edi], 0x37
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret
Function at 0x501281
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
mov eax, dword [edi + 0x164]
test eax, eax
je 0x5012a6
push dword [edi + 0xf4]
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
push edi
call eax
add esp, 0x14
jmp 0x5012dd
cmp edx, 2
ja 0x5012db
push dword [edi + 0xf0]
imul eax, edx, 3
push 1
push 2
add eax, 0x57ae50
push eax
call dword [sym.imp.MSVCR120.dll_fwrite]
push dword [edi + 0xf0]
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCR120.dll_fwrite]
add esp, 0x20
xor eax, eax
pop edi
pop ebp
ret
Function at 0x50807e
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
or ebx, 0xffffffff
push edi
test esi, esi
je 0x5080ae
xor edi, edi
xor ecx, ecx
mov eax, edi
inc ecx
cmp dword [esi + eax*8], ebx
jne 0x5080c6
inc eax
cmp eax, ecx
jb 0x5080a4
mov ecx, ebx
call fcn.00507d58
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0x218], edi
mov word [esi + 6], ax
mov edx, ebx
mov eax, dword [esi]
mov dword [ebp - 0x110], edi
mov dword [ebp - 0x320], edi
cmp eax, ebx
je 0x508129
movzx ecx, word [esi + 4]
test cl, 7
je 0x508129
cmp eax, ebx
cmova edx, eax
xor ebx, ebx
inc ebx
test bl, cl
je 0x508107
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x218], ebx
test cl, 4
je 0x508118
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x110], ebx
test cl, 2
je 0x508129
mov dword [ebp - 0x31c], eax
mov dword [ebp - 0x320], ebx
lea ebx, [edx + 1]
push edi
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x508161
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x50812c
cmp eax, 0x2714
je 0x50812c
jmp 0x508165
test eax, eax
jns 0x50816d
or eax, 0xffffffff
jmp 0x5080b5
jne 0x508176
xor eax, eax
jmp 0x5080b5
xor eax, eax
cmp dword [esi], 0xffffffff
mov word [esi + 6], ax
je 0x5081cf
mov ebx, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
lea eax, [ebp - 0x218]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x50819d
xor eax, eax
inc eax
or word [esi + 6], ax
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x5081b1
or word [esi + 6], 4
lea eax, [ebp - 0x320]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x5081c5
or word [esi + 6], 2
cmp word [esi + 6], di
push 1
pop eax
cmovne edi, eax
mov eax, edi
jmp 0x5080b5
Function at 0x50bd1e
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov dword [ebp - 4], edx
xor ebx, ebx
and dword [eax], ebx
xor edx, edx
mov dword [ebp - 8], ecx
mov ecx, dword [ecx]
push 1
call fcn.004ff1e0
pop ecx
test eax, eax
js 0x50bda1
mov edi, dword [ebp + 0xc]
or esi, 0xffffffff
mov ecx, dword [ebp - 4]
mov edx, esi
push eax
push esi
call fcn.00507d77
pop ecx
pop ecx
test eax, eax
jle 0x50bda4
push 0
push edi
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jne 0x50bd7f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x50bd8e
push 0x38
jmp 0x50bda3
cmp edi, eax
je 0x50bdad
test eax, eax
je 0x50bda4
add dword [ebp + 8], eax
sub edi, eax
add ebx, eax
mov eax, dword [ebp - 8]
xor edx, edx
push 1
mov ecx, dword [eax]
call fcn.004ff1e0
pop ecx
test eax, eax
jns 0x50bd49
push 0x1c
pop esi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
add eax, ebx
xor esi, esi
mov dword [ecx], eax
jmp 0x50bda4
Function at 0x50e73f
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov eax, ecx
mov dword [ebp - 0x8c], 0x80
push edi
mov dword [ebp - 0x90], eax
mov esi, dword [eax + 0x3d0]
mov edi, dword [eax]
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x88]
push eax
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [esi + 0x15c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x50e7cf
push dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
push eax
lea eax, [esi + 0xc8]
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebp - 0x8c]
add esp, 0xc
mov dword [esi + 0x148], eax
mov ebx, dword [esi + 0x14c]
cmp ebx, 4
jge 0x50e801
push str.Received_too_short_packet
push edi
call fcn.00500d35
pop ecx
pop ecx
mov dword [esi + 0xc], 7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x15c]
movzx eax, byte [ecx]
shl ax, 8
movzx edx, ax
movzx eax, byte [ecx + 1]
or edx, eax
mov dword [esi + 0xc], edx
sub edx, 3
je 0x50e881
dec edx
je 0x50e8f6
dec edx
je 0x50e857
dec edx
je 0x50e83e
push str.Internal_error:_Unexpected_packet
push 0x583be0
push edi
call fcn.00500d35
jmp 0x50e87c
lea eax, [ebx - 2]
lea edx, [ecx + 2]
mov ecx, esi
push eax
call fcn.0050d9ea
pop ecx
test eax, eax
je 0x50e8f6
jmp 0x50e7f0
mov edx, ecx
movzx eax, byte [edx + 2]
shl ax, 8
movzx ecx, ax
movzx eax, byte [edx + 3]
or ecx, eax
lea eax, [edx + 4]
push eax
push 0x588d2c
push edi
mov dword [esi + 8], ecx
call fcn.00500cc1
add esp, 0xc
jmp 0x50e8f6
cmp ebx, 4
jle 0x50e8f6
movzx eax, byte [ecx + 2]
shl ax, 8
movzx edx, ax
movzx eax, byte [ecx + 3]
or edx, eax
movzx eax, word [esi + 0x40]
inc eax
and eax, 0xffff
cmp eax, edx
jne 0x50e8f6
lea eax, [ebx - 4]
add ecx, 4
push eax
xor edx, edx
push ecx
mov ecx, dword [ebp - 0x90]
inc edx
call fcn.0050104b
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x50e8d4
push 5
pop edx
mov ecx, esi
call fcn.0050e507
mov eax, ebx
jmp 0x50e7f0
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x38], eax
mov eax, dword [edi + 0x38]
adc dword [edi + 0x3c], edx
mov dword [edi + 0x450], eax
mov eax, dword [edi + 0x3c]
mov dword [edi + 0x454], eax
mov ecx, dword [ebp - 0x90]
call fcn.0050865f
test eax, eax
je 0x50e7ee
push 5
pop edx
mov ecx, esi
call fcn.0050e507
push 0x2a
pop eax
jmp 0x50e7f0