joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4fc630
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x572954
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
push edi
mov eax, dword [0x67d978]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x2c]
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], vtable.CryptoPP::AlgorithmParameters.0
mov dword [esp + 0x14], eax
mov byte [esp + 0x18], 1
mov eax, dword [esp + 0x30]
push 1
push eax
lea edi, [esp + 0x18]
mov dword [esp + 0x2c], 1
call fcn.004e9710
push eax
push esi
call fcn.004d5ac0
mov ecx, edi
push ecx
mov dword [esp + 0x10], 1
mov byte [esp + 0x28], 0
call fcn.0046a6f6
mov eax, esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x1c
ret

Function at 0x4fd4a4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [edi + 0x2c]
push esi
mov esi, dword [edi + 0x3c]
sub esi, dword [edi + 0x74]
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x2c]
lea ecx, [ebx + ecx - 0x106]
sub esi, eax
cmp eax, ecx
jb 0x4fd529
mov eax, dword [edi + 0x38]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call fcn.00540410
mov eax, dword [edi + 0x4c]
mov ecx, dword [edi + 0x44]
sub dword [edi + 0x70], ebx
sub dword [edi + 0x6c], ebx
add esp, 0xc
sub dword [edi + 0x5c], ebx
mov dword [ebp - 4], eax
lea eax, [ecx + eax*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x4fd4ec
mov eax, dword [edi + 0x40]
mov dword [ebp - 4], ebx
lea eax, [eax + ebx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x4fd50e
add esi, ebx
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x4fd584
mov ecx, dword [edi + 0x74]
add ecx, dword [edi + 0x6c]
push esi
add ecx, dword [edi + 0x38]
mov esi, eax
push ecx
call fcn.004fd20a
add dword [edi + 0x74], eax
mov esi, dword [edi + 0x74]
cmp esi, 3
pop ecx
pop ecx
jb 0x4fd570
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x38]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [edi + 0x58]
mov dword [edi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [edi + 0x54]
mov dword [edi + 0x48], eax
cmp esi, 0x106
jae 0x4fd584
mov eax, dword [edi]
cmp dword [eax + 4], 0
jne 0x4fd4ad
pop esi
pop ebx
leave
ret
Function at 0x50f593
Capabilities:
Set thread local storage value

Disassembly:
push 0x20
mov eax, 0x56e59f
call fcn.0053d79c
mov ebx, dword [ebp + 8]
and dword [ebp - 4], 0
push dword [edi]
call fcn.0050f85a
test al, al
pop ecx
je 0x50f5db
lea ecx, [ebp + 0xb]
call fcn.00433d8a
mov byte [ebp - 4], 1
lea eax, [ebp + 0xc]
push eax
push eax
call fcn.0050fecb
pop ecx
pop ecx
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xb]
call fcn.00433d84
jmp 0x50f711
lea eax, [ebp + 0xc]
push eax
push 0x34
mov dword [ebp - 0x2c], eax
call fcn.00433d5b
mov esi, eax
pop ecx
mov dword [ebp - 0x28], esi
and dword [ebp - 0x24], 0
pop ecx
mov byte [ebp - 4], 2
mov dword [ebp + 8], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x50f627
sub esp, 0x14
mov eax, esp
mov dword [ebp - 0x14], esp
lea ecx, [ebp + 0xc]
push ecx
push eax
call fcn.0050ed5d
mov byte [ebp - 4], 4
push esi
mov byte [ebp - 4], 3
call fcn.0050f9d8
mov esi, eax
jmp 0x50f629
xor esi, esi
mov byte [ebp - 4], 2
push dword [ebx + 0x14]
mov dword [ebp - 0x24], esi
call fcn.0048f14e
mov byte [ebp - 0xd], al
mov eax, dword [edi]
pop ecx
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi]
inc dword [eax + 0x38]
mov eax, dword [edi]
cmp dword [eax + 0x38], 1
sete byte [ebp + 0xb]
cmp byte [ebp - 0xd], 0
je 0x50f6d7
cmp byte [ebp + 0xb], 0
je 0x50f6d7
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x2c]
call fcn.0050fa30
mov eax, dword [edi]
lea esi, [ebp - 0x20]
call fcn.00512862
mov byte [ebp - 4], 5
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [edi]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xb]
call fcn.00433d8a
mov byte [ebp - 4], 7
lea eax, [ebp + 0xc]
push eax
push eax
call fcn.0050fecb
pop ecx
pop ecx
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xb]
call fcn.00433d84
mov byte [ebp - 4], 5
lea esi, [ebp - 0x18]
call fcn.0051473e
mov byte [ebp - 4], 2
push dword [ebp - 0x1c]
push dword [0x6d2bbc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x50f705
lea ecx, [eax + 0x3c]
mov eax, esi
call fcn.00433eec
mov eax, dword [edi]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [ebp - 0x24], 0
and dword [ebp - 0x28], 0
cmp byte [ebp + 0xb], 0
je 0x50f705
push dword [edi]
mov ecx, dword [ebx + 0x14]
call fcn.00433ce9
mov byte [ebp - 4], 0
lea esi, [ebp - 0x2c]
call fcn.0050fa30
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 0xc]
push eax
call fcn.0050d54b
call fcn.0053d874
ret 0x18
Function at 0x5108ac
Capabilities:
Set thread local storage value

Disassembly:
push 0x1c
mov eax, 0x572823
call fcn.0053d79c
mov ebx, dword [ebp + 0xc]
and dword [ebp - 4], 0
push dword [ebx]
call fcn.0050f85a
test al, al
pop ecx
je 0x5108f4
lea ecx, [ebp + 0xf]
call fcn.00433d8a
mov byte [ebp - 4], 1
lea eax, [ebp + 0x10]
push eax
mov edi, eax
call fcn.00510fa3
pop ecx
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xf]
call fcn.00433d84
jmp 0x510a2c
lea eax, [ebp + 0x10]
push eax
push 0x38
mov dword [ebp - 0x28], eax
call fcn.00433d5b
mov esi, eax
pop ecx
mov dword [ebp - 0x24], esi
and dword [ebp - 0x20], 0
pop ecx
mov byte [ebp - 4], 2
mov dword [ebp + 0xc], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x51093f
sub esp, 0x18
mov eax, esp
mov dword [ebp - 0x10], esp
push eax
lea edi, [ebp + 0x10]
call fcn.00510749
mov byte [ebp - 4], 4
push esi
mov byte [ebp - 4], 3
call fcn.00510b26
mov esi, eax
jmp 0x510941
xor esi, esi
mov byte [ebp - 4], 2
mov edi, dword [ebp + 8]
push dword [edi + 0x14]
mov dword [ebp - 0x20], esi
call fcn.0048f14e
mov byte [ebp + 0xb], al
mov eax, dword [ebx]
pop ecx
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx]
inc dword [eax + 0x38]
mov eax, dword [ebx]
cmp dword [eax + 0x38], 1
sete byte [ebp + 0xf]
cmp byte [ebp + 0xb], 0
je 0x5109f2
cmp byte [ebp + 0xf], 0
je 0x5109f2
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x28]
call fcn.00510b7c
mov eax, dword [ebx]
lea esi, [ebp - 0x1c]
call fcn.00512862
mov byte [ebp - 4], 5
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xf]
call fcn.00433d8a
mov byte [ebp - 4], 7
lea eax, [ebp + 0x10]
push eax
mov edi, eax
call fcn.00510fa3
pop ecx
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xf]
call fcn.00433d84
mov byte [ebp - 4], 5
lea esi, [ebp - 0x14]
call fcn.0051473e
mov byte [ebp - 4], 2
push dword [ebp - 0x18]
push dword [0x6d2bbc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x510a20
lea ecx, [eax + 0x3c]
mov eax, esi
call fcn.00433eec
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [ebp - 0x20], 0
and dword [ebp - 0x24], 0
cmp byte [ebp + 0xf], 0
je 0x510a20
push dword [ebx]
mov ecx, dword [edi + 0x14]
call fcn.00433ce9
mov byte [ebp - 4], 0
lea esi, [ebp - 0x28]
call fcn.00510b7c
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 0x10]
push eax
call fcn.00510030
call fcn.0053d874
ret 0x20
Function at 0x510e08
Capabilities:
Set thread local storage value

Disassembly:
push 0x1c
mov eax, 0x56e1bb
call fcn.0053d79c
mov ebx, dword [ebp + 0xc]
and dword [ebp - 4], 0
push dword [ebx]
call fcn.0050f85a
test al, al
pop ecx
je 0x510e50
lea ecx, [ebp + 0xf]
call fcn.00433d8a
mov byte [ebp - 4], 1
lea eax, [ebp + 0x10]
push eax
mov edi, eax
call fcn.005111e9
pop ecx
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xf]
call fcn.00433d84
jmp 0x510f8e
lea eax, [ebp + 0x10]
mov dword [ebp - 0x28], eax
lea eax, [ebp + 0x48]
push eax
push 0x88
call fcn.00433d5b
mov esi, eax
pop ecx
mov dword [ebp - 0x24], esi
and dword [ebp - 0x20], 0
pop ecx
mov byte [ebp - 4], 2
mov dword [ebp + 0xc], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x510ea1
sub esp, 0x68
mov eax, esp
mov dword [ebp - 0x10], esp
push eax
lea edi, [ebp + 0x10]
call fcn.00510a41
mov byte [ebp - 4], 4
push esi
mov byte [ebp - 4], 3
call fcn.00511075
mov esi, eax
jmp 0x510ea3
xor esi, esi
mov byte [ebp - 4], 2
mov edi, dword [ebp + 8]
push dword [edi + 0x14]
mov dword [ebp - 0x20], esi
call fcn.0048f14e
mov byte [ebp + 0xb], al
mov eax, dword [ebx]
pop ecx
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx]
inc dword [eax + 0x38]
mov eax, dword [ebx]
cmp dword [eax + 0x38], 1
sete byte [ebp + 0xf]
cmp byte [ebp + 0xb], 0
je 0x510f54
cmp byte [ebp + 0xf], 0
je 0x510f54
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x28]
call fcn.005110cb
mov eax, dword [ebx]
lea esi, [ebp - 0x1c]
call fcn.00512862
mov byte [ebp - 4], 5
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xf]
call fcn.00433d8a
mov byte [ebp - 4], 7
lea eax, [ebp + 0x10]
push eax
mov edi, eax
call fcn.005111e9
pop ecx
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xf]
call fcn.00433d84
mov byte [ebp - 4], 5
lea esi, [ebp - 0x14]
call fcn.0051473e
mov byte [ebp - 4], 2
push dword [ebp - 0x18]
push dword [0x6d2bbc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x510f82
lea ecx, [eax + 0x3c]
mov eax, esi
call fcn.00433eec
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [ebp - 0x20], 0
and dword [ebp - 0x24], 0
cmp byte [ebp + 0xf], 0
je 0x510f82
push dword [ebx]
mov ecx, dword [edi + 0x14]
call fcn.00433ce9
mov byte [ebp - 4], 0
lea esi, [ebp - 0x28]
call fcn.005110cb
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 0x10]
push eax
call fcn.0051071b
call fcn.0053d874
ret 0x70
Function at 0x51169c
Capabilities:
Set thread local storage value

Disassembly:
push 0x20
mov eax, 0x57c1a0
call fcn.0053d79c
mov ebx, dword [ebp + 8]
and dword [ebp - 4], 0
push dword [edi]
call fcn.0050f85a
test al, al
pop ecx
je 0x5116e4
lea ecx, [ebp + 0xb]
call fcn.00433d8a
mov byte [ebp - 4], 1
lea eax, [ebp + 0xc]
push eax
mov ecx, eax
call fcn.00511951
pop ecx
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xb]
call fcn.00433d84
jmp 0x51181c
lea eax, [ebp + 0xc]
mov dword [ebp - 0x2c], eax
lea eax, [ebp + 0x3c]
push eax
push 0x5c
call fcn.00433d5b
mov esi, eax
pop ecx
mov dword [ebp - 0x28], esi
and dword [ebp - 0x24], 0
pop ecx
mov byte [ebp - 4], 2
mov dword [ebp + 8], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x511732
sub esp, 0x3c
mov eax, esp
mov dword [ebp - 0x14], esp
push eax
lea ecx, [ebp + 0xc]
call fcn.00511635
mov byte [ebp - 4], 4
push esi
mov byte [ebp - 4], 3
call fcn.00511831
mov esi, eax
jmp 0x511734
xor esi, esi
mov byte [ebp - 4], 2
push dword [ebx + 0x14]
mov dword [ebp - 0x24], esi
call fcn.0048f14e
mov byte [ebp - 0xd], al
mov eax, dword [edi]
pop ecx
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi]
inc dword [eax + 0x38]
mov eax, dword [edi]
cmp dword [eax + 0x38], 1
sete byte [ebp + 0xb]
cmp byte [ebp - 0xd], 0
je 0x5117e2
cmp byte [ebp + 0xb], 0
je 0x5117e2
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x2c]
call fcn.00511888
mov eax, dword [edi]
lea esi, [ebp - 0x20]
call fcn.00512862
mov byte [ebp - 4], 5
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [edi]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xb]
call fcn.00433d8a
mov byte [ebp - 4], 7
lea eax, [ebp + 0xc]
push eax
mov ecx, eax
call fcn.00511951
pop ecx
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xb]
call fcn.00433d84
mov byte [ebp - 4], 5
lea esi, [ebp - 0x18]
call fcn.0051473e
mov byte [ebp - 4], 2
push dword [ebp - 0x1c]
push dword [0x6d2bbc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x511810
lea ecx, [eax + 0x3c]
mov eax, esi
call fcn.00433eec
mov eax, dword [edi]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [ebp - 0x24], 0
and dword [ebp - 0x28], 0
cmp byte [ebp + 0xb], 0
je 0x511810
push dword [edi]
mov ecx, dword [ebx + 0x14]
call fcn.00433ce9
mov byte [ebp - 4], 0
lea esi, [ebp - 0x2c]
call fcn.00511888
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 0xc]
push eax
call fcn.00511569
call fcn.0053d874
ret 0x40
Function at 0x511988
Capabilities:
Set thread local storage value

Disassembly:
push 0x20
mov eax, 0x56e059
call fcn.0053d79c
mov ebx, dword [ebp + 8]
and dword [ebp - 4], 0
push dword [edi]
call fcn.0050f85a
test al, al
pop ecx
je 0x5119d0
lea ecx, [ebp + 0xb]
call fcn.00433d8a
mov byte [ebp - 4], 1
lea eax, [ebp + 0xc]
push eax
mov ecx, eax
call fcn.00511c71
pop ecx
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xb]
call fcn.00433d84
jmp 0x511b05
lea eax, [ebp + 0xc]
push eax
push 0x50
mov dword [ebp - 0x2c], eax
call fcn.00433d5b
mov esi, eax
pop ecx
mov dword [ebp - 0x28], esi
and dword [ebp - 0x24], 0
pop ecx
mov byte [ebp - 4], 2
mov dword [ebp + 8], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x511a1b
sub esp, 0x30
mov eax, esp
mov dword [ebp - 0x14], esp
push eax
lea ecx, [ebp + 0xc]
call fcn.0050ec82
mov byte [ebp - 4], 4
push esi
mov byte [ebp - 4], 3
call fcn.00511b1a
mov esi, eax
jmp 0x511a1d
xor esi, esi
mov byte [ebp - 4], 2
push dword [ebx + 0x14]
mov dword [ebp - 0x24], esi
call fcn.0048f14e
mov byte [ebp - 0xd], al
mov eax, dword [edi]
pop ecx
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi]
inc dword [eax + 0x38]
mov eax, dword [edi]
cmp dword [eax + 0x38], 1
sete byte [ebp + 0xb]
cmp byte [ebp - 0xd], 0
je 0x511acb
cmp byte [ebp + 0xb], 0
je 0x511acb
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x2c]
call fcn.00511b71
mov eax, dword [edi]
lea esi, [ebp - 0x20]
call fcn.00512862
mov byte [ebp - 4], 5
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [edi]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xb]
call fcn.00433d8a
mov byte [ebp - 4], 7
lea eax, [ebp + 0xc]
push eax
mov ecx, eax
call fcn.00511c71
pop ecx
mov byte [ebp - 4], 6
lea ecx, [ebp + 0xb]
call fcn.00433d84
mov byte [ebp - 4], 5
lea esi, [ebp - 0x18]
call fcn.0051473e
mov byte [ebp - 4], 2
push dword [ebp - 0x1c]
push dword [0x6d2bbc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x511af9
lea ecx, [eax + 0x3c]
mov eax, esi
call fcn.00433eec
mov eax, dword [edi]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [ebp - 0x24], 0
and dword [ebp - 0x28], 0
cmp byte [ebp + 0xb], 0
je 0x511af9
push dword [edi]
mov ecx, dword [ebx + 0x14]
call fcn.00433ce9
mov byte [ebp - 4], 0
lea esi, [ebp - 0x2c]
call fcn.00511b71
or dword [ebp - 4], 0xffffffff
lea eax, [ebp + 0xc]
push eax
call fcn.0050c553
call fcn.0053d874
ret 0x34
Function at 0x511d88
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, eax
mov eax, dword [edi + 4]
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
xor ebx, ebx
cmp byte [ebp + 0x18], bl
push ebx
je 0x511da7
push ebx
jmp 0x511df5
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x511db8
push 0x2719
jmp 0x511df5
push esi
push dword [ebp + 0x14]
lea ecx, [ebp + 0x18]
push ecx
push dword [ebp + 0x10]
mov dword [ebp + 0x18], ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_WSASend]
mov dword [ebp + 8], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x4d2
jne 0x511de5
mov eax, 0x274d
cmp dword [ebp + 8], ebx
je 0x511dff
cmp eax, 0x3e5
je 0x511dff
push dword [ebp + 0x18]
push eax
mov ecx, dword [edi + 4]
call fcn.00511e0e
jmp 0x511e08
mov ecx, dword [edi + 4]
push esi
call fcn.00511e86
pop esi
pop ebx
pop ebp
ret 0x14

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

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, eax
mov eax, dword [edi + 4]
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
xor ebx, ebx
cmp byte [ebp + 0x14], bl
push ebx
je 0x511fbb
push ebx
jmp 0x512019
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x511fcc
push 0x2719
jmp 0x512019
push esi
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp + 0x14]
push ecx
push dword [ebp + 0x10]
mov dword [ebp + 0x14], ebx
push dword [ebp + 0xc]
mov dword [ebp + 8], ebx
push eax
call dword [sym.imp.WS2_32.dll_WSARecv]
mov dword [ebp + 0x10], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
jne 0x511ffd
mov eax, 0x2746
jmp 0x512009
cmp eax, 0x4d2
jne 0x512009
mov eax, 0x274d
cmp dword [ebp + 0x10], ebx
je 0x512023
cmp eax, 0x3e5
je 0x512023
push dword [ebp + 0x14]
push eax
mov ecx, dword [edi + 4]
call fcn.00511e0e
jmp 0x51202c
mov ecx, dword [edi + 4]
push esi
call fcn.00511e86
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x512108
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 8], 0xffffffff
push esi
push edi
mov esi, eax
mov edi, ecx
jne 0x51212b
mov edi, 0x2719
call fcn.00524420
mov dword [esi + 4], eax
mov dword [esi], edi
xor al, al
jmp 0x51216d
push ebx
xor ebx, ebx
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea eax, [ebp - 4]
push eax
push 0x8004667e
push dword [ebp + 8]
mov dword [ebp - 4], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push eax
call fcn.00511f83
test eax, eax
pop ecx
jl 0x51216a
call fcn.00524420
mov dword [esi + 4], eax
mov dword [esi], ebx
or byte [edi], 2
mov al, 1
jmp 0x51216c
xor al, al
pop ebx
pop edi
pop esi
leave
ret
Function at 0x512171
Capabilities:
Connect socket

Disassembly:
cmp dword [esp + 4], 0xffffffff
push esi
push edi
mov esi, eax
jne 0x512190
mov edi, 0x2719
call fcn.00524420
mov dword [esi + 4], eax
mov dword [esi], edi
or eax, 0xffffffff
jmp 0x5121c6
push ebx
xor edi, edi
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_connect]
push eax
call fcn.00511f83
mov ebx, eax
cmp ebx, edi
pop ecx
jne 0x5121c3
call fcn.00524420
mov dword [esi], edi
mov dword [esi + 4], eax
mov eax, ebx
pop ebx
pop edi
pop esi
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
lea eax, [ebp - 5]
push esi
mov byte [ebp - 5], bl
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x10], ebx
call fcn.00524420
mov eax, dword [ebp + 8]
mov esi, dword [eax + 4]
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
push ebx
push ebx
lea eax, [ebp + 8]
push eax
push 1
lea eax, [ebp - 0x18]
push eax
push esi
mov dword [ebp + 8], ebx
call dword [sym.imp.WS2_32.dll_WSASend]
push eax
lea esi, [ebp - 0x10]
call fcn.00511f83
cmp dword [ebp - 0x10], 0x40
pop ecx
mov esi, eax
je 0x51283e
cmp dword [ebp - 0x10], 0x4d2
jne 0x512843
call fcn.00524420
cmp esi, ebx
jne 0x51284c
call fcn.00524420
pop esi
pop ebx
leave
ret 4
Function at 0x5132e8
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor ebx, ebx
cmp dword [ebp + 8], 0xffffffff
push edi
mov esi, eax
mov edi, ecx
je 0x513372
mov al, byte [edi]
test al, 3
je 0x51331f
test al, 8
je 0x51331f
lea eax, [ebp - 4]
push eax
push 0x8004667e
push dword [ebp + 8]
mov dword [ebp - 4], ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
and byte [edi], 0xfc
cmp byte [ebp + 0xc], bl
je 0x513354
test byte [edi], 8
je 0x513354
and word [ebp - 4], bx
and word [ebp - 2], bx
call fcn.00524420
lea eax, [ebp - 4]
push eax
push 0x80
push 0xffff
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
mov eax, edi
call fcn.005133f1
add esp, 0x10
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_closesocket]
push eax
call fcn.00511f83
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x51337e
xor edi, edi
call fcn.00524420
mov dword [esi], edi
mov dword [esi + 4], eax
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret

Function at 0x513b26
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor ebx, ebx
push ebx
mov esi, eax
mov edi, ecx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp dword [ebp + 0xc], ebx
jne 0x513b7b
cmp dword [ebp + 0x10], ebx
jne 0x513b7b
cmp dword [ebp + 0x14], ebx
jne 0x513b7b
cmp edi, ebx
je 0x513b96
mov eax, dword [edi + 4]
cdq
mov ecx, 0x3e8
idiv ecx
mov ecx, dword [edi]
imul ecx, ecx, 0x3e8
add eax, ecx
jne 0x513b64
inc eax
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
call fcn.00524420
mov dword [esi + 4], eax
mov dword [esi], edi
xor eax, eax
jmp 0x513bc4
cmp edi, ebx
je 0x513b96
cmp dword [edi], ebx
jne 0x513b96
mov eax, dword [edi + 4]
cmp eax, ebx
jle 0x513b96
mov ecx, 0x3e8
cmp eax, ecx
jge 0x513b96
mov dword [edi + 4], ecx
push edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_select]
push eax
call fcn.00511f83
mov ebx, eax
test ebx, ebx
pop ecx
jl 0x513bc2
xor edi, edi
call fcn.00524420
mov dword [esi], edi
mov dword [esi + 4], eax
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
xor edi, edi
push edi
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push edi
push edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push 1
push dword [ebp + 0xc]
mov dword [ebp - 4], edi
push dword [ebp + 8]
mov dword [ebp - 8], edi
call dword [sym.imp.WS2_32.dll_WSARecv]
push eax
call fcn.00511f83
mov dword [ebp - 0xc], eax
mov eax, dword [esi]
cmp eax, 0x40
pop ecx
jne 0x513c96
mov ebx, 0x2746
jmp 0x513ca2
cmp eax, 0x4d2
jne 0x513cac
mov ebx, 0x274d
call fcn.00524420
mov dword [esi + 4], eax
mov dword [esi], ebx
cmp dword [ebp - 0xc], edi
je 0x513cb6
or eax, 0xffffffff
jmp 0x513cc3
call fcn.00524420
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
mov dword [esi], edi
pop edi
pop esi
pop ebx
leave
ret