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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov edx, dword [esp + 0x20]
mov al, 1
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x4a1f84
mov esi, dword [esp + 0x24]
mov edx, dword [edx]
mov edi, dword [esi]
mov ah, byte [edx]
movzx ebx, byte [edi]
not bl
test ah, bl
jne 0x4a1f84
mov ebx, dword [esi + 8]
test ebx, ebx
je 0x4a1f8c
mov esi, dword [esi + 4]
mov ebp, 1
xor byte [esi], ah
cmp ebx, 1
je 0x4a1f7f
mov dword [esp], esi
lea edi, [esi + 1]
lea esi, [ecx - 1]
lea eax, [ebx - 2]
mov dword [esp + 8], ebx
cmp esi, eax
mov ebx, eax
cmovb ebx, esi
inc ebx
cmp ebx, 0x10
mov dword [esp + 4], ebx
jbe 0x4a1f59
cmp esi, eax
cmovb eax, esi
lea esi, [edx + eax + 2]
cmp edi, esi
jae 0x4a1f19
mov esi, dword [esp]
lea ebx, [edx + 1]
lea esi, [esi + eax + 2]
cmp ebx, esi
jb 0x4a1f59
mov eax, dword [esp + 4]
mov ebp, 0x10
mov esi, eax
mov ebx, eax
and esi, 0xf
cmovne ebp, esi
mov esi, eax
sub ebx, ebp
neg ebp
lea ebp, [esi + ebp + 1]
lea eax, [edi + ebx]
xor esi, esi
nop dword [eax + eax]
movups xmm0, xmmword [edx + esi + 1]
movups xmm1, xmmword [edi + esi]
xorps xmm1, xmm0
movups xmmword [edi + esi], xmm1
add esi, 0x10
cmp ebx, esi
jne 0x4a1f40
mov edi, eax
mov esi, dword [esp]
mov al, 1
add esi, dword [esp + 8]
nop word cs:[eax + eax]
nop dword [eax]
cmp ecx, ebp
je 0x4a1f84
mov ah, byte [edx + ebp]
inc ebp
xor byte [edi], ah
inc edi
cmp edi, esi
jne 0x4a1f70
cmp ebp, ecx
setne al
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x52a150
push 0
push 0
call fcn.00500690
int3

Function at 0x4a65c0
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
mov eax, dword [esp + 4]
mov edx, dword [esp + 0xc]
movups xmm2, xmmword [eax]
mov ecx, dword [edx + 0xf0]
mov eax, dword [esp + 8]
movups xmm0, xmmword [edx]
movups xmm1, xmmword [edx + 0x10]
lea edx, [edx + 0x20]
xorps xmm2, xmm0
aesenc xmm2, xmm1
dec ecx
movups xmm1, xmmword [edx]
lea edx, [edx + 0x10]
jne 0x4a65e2
aesenclast xmm2, xmm1
pxor xmm0, xmm0
pxor xmm1, xmm1
movups xmmword [eax], xmm2
pxor xmm2, xmm2
ret
Function at 0x4a78f0
Capabilities:
Generate random numbers via rtlgenrandom
Generate random numbers via winapi

Disassembly:
push ebp
push ebx
push edi
push esi
mov ebx, dword [esp + 0x18]
xor esi, esi
test ebx, ebx
je 0x4a792c
mov ebp, dword [esp + 0x14]
push 2
push ebx
push ebp
push 0
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
cmp eax, 0xc0000000
jb 0x4a792c
mov edi, eax
push ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_SystemFunction036]
and edi, 0x7fffffff
xor esi, esi
test al, al
cmove esi, edi
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4afa50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
push edi
push esi
sub esp, 8
mov eax, 2
test edx, edx
je 0x4afa8a
cmp edx, 1
jne 0x4afa8f
xor esi, esi
nop word cs:[eax + eax]
cmp edx, esi
je 0x4afb10
movzx ebx, byte [ecx + esi]
inc esi
add bl, 0xd0
cmp bl, 0xa
jb 0x4afa70
jmp 0x4afb1c
jmp 0x4afb45
movzx esi, word [ecx]
cmp esi, 0x7830
je 0x4afad3
movzx esi, word [ecx]
cmp esi, 0x5830
je 0x4afad3
cmp byte [ecx], 0x30
jne 0x4afa64
cmp byte [ecx + 1], 0xbf
jle 0x4afb5b
inc ecx
dec edx
mov esi, edx
mov edi, ecx
nop word [eax + eax]
test esi, esi
je 0x4afb27
movzx ebx, byte [edi]
inc edi
dec esi
and bl, 0xf8
cmp bl, 0x30
je 0x4afac0
jmp 0x4afb1c
cmp edx, 3
jb 0x4afb17
cmp byte [ecx + 2], 0xbf
jle 0x4afb4c
add ecx, 2
add edx, 0xfffffffe
mov esi, edx
mov edi, ecx
nop dword [eax + eax]
test esi, esi
je 0x4afb20
movzx ebx, byte [edi]
inc edi
dec esi
mov bh, bl
add bh, 0xd0
cmp bh, 0xa
jb 0x4afaf0
and bl, 0xdf
add bl, 0xbf
cmp bl, 6
jb 0x4afaf0
jmp 0x4afb1c
mov eax, 0xa
jmp 0x4afb2c
mov eax, 1
xor edx, edx
jmp 0x4afb45
mov eax, 0x10
jmp 0x4afb2c
mov eax, 8
mov esi, esp
push eax
push edx
push ecx
push esi
call fcn.004e9070
add esp, 0x10
movzx eax, byte [esp]
mov edx, dword [esp + 4]
xor eax, 1
add esp, 8
pop esi
pop edi
pop ebx
ret
push 0x531a74
push edx
push 2
push edx
push ecx
call fcn.005004f0
push 0x531a64
push edx
push 1
push edx
push ecx
call fcn.005004f0
int3
Function at 0x4bffd0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x4c08f0
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
movzx eax, byte [0x5781c0]
test al, al
je 0x4c01a1
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4c001c
cmp eax, 3
jne 0x4c019a
mov ebx, dword [0x5781c4]
test ebx, ebx
je 0x4c019a
mov dword [ebp - 0x20], 0
jmp 0x4c0047
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x4c0078
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4c01eb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4c0040
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x4c0040
test byte [ebp - 0x20], 1
je 0x4c019a
mov ebx, dword [0x5781c4]
test ebx, ebx
je 0x4c019a
mov dword [ebp - 0x20], 0
jmp 0x4c00a7
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x4c00d8
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4c01eb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4c00a0
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x4c00a0
test byte [ebp - 0x20], 1
je 0x4c019a
mov ebx, dword [0x5781c4]
test ebx, ebx
je 0x4c019a
mov dword [ebp - 0x20], 0
jmp 0x4c0107
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x4c0138
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4c01eb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4c0100
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x4c0100
test byte [ebp - 0x20], 1
je 0x4c019a
mov ebx, dword [0x5781c4]
test ebx, ebx
je 0x4c019a
mov dword [ebp - 0x20], 0
jmp 0x4c0167
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x4c0194
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4c01eb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4c0160
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x4c0160
test byte [ebp - 0x20], 1
jne 0x4c01b4
movzx eax, byte [0x56bc80]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
mov ebx, dword [0x5781c4]
jmp 0x4c01bf
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x4c019a
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4c01eb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4c01bc
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
jmp 0x4c01bc
mov dword [ebp - 0x10], 0
push 0x564c24
call fcn.00500310
add esp, 4
ud2
Function at 0x4c48d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi]
test eax, eax
je 0x4c48f3
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x4c4908
cmp dword [eax + 4], 0
je 0x4c4908
add eax, 8
pop esi
ret
push esi
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x4c48e8
mov eax, dword [esi]
test eax, eax
je 0x4c499a
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x4c49b3
test eax, eax
jne 0x4c495e
movzx eax, byte [0x5781b1]
push 4
push 0x10
call fcn.00402ce0
add esp, 8
test eax, eax
je 0x4c49c8
mov dword [eax], esi
mov dword [eax + 4], 0
mov ecx, dword [esi]
test ecx, ecx
je 0x4c49b7
dec ecx
push eax
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, esi
mov esi, dword [esp + 0xc]
test esi, esi
je 0x4c4982
mov edx, dword [esi]
xor ecx, ecx
mov dword [esi], 0
cmp edx, 1
mov edx, 0
jne 0x4c4986
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
jmp 0x4c4986
xor ecx, ecx
xor edx, edx
lea esi, [eax + 8]
mov dword [eax + 4], 1
mov dword [eax + 8], ecx
mov byte [eax + 0xc], dl
mov eax, esi
pop esi
ret
push esi
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x4c4923
xor eax, eax
pop esi
ret
push esi
mov esi, eax
call fcn.004ff550
add esp, 4
mov ecx, eax
mov eax, esi
jmp 0x4c4952
push 0x10
push 4
call fcn.00500210
int3
Function at 0x4c49e0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
and esp, 0xfffffff0
sub esp, 0x20
mov esi, dword [ebp + 8]
mov eax, dword [esi]
test eax, eax
je 0x4c4ac3
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x4c4a0f
mov ecx, dword [eax]
or ecx, dword [eax + 4]
jne 0x4c4aba
mov eax, dword [esi]
test eax, eax
je 0x4c4ae1
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x4c4afa
test eax, eax
jne 0x4c4a70
movzx eax, byte [0x5781b1]
push 8
push 0x20
call fcn.00402ce0
add esp, 8
test eax, eax
je 0x4c4b16
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 0x18], esi
mov ecx, dword [esi]
test ecx, ecx
je 0x4c4b02
dec ecx
push eax
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, esi
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x4c4a8f
mov edx, dword [ecx]
movups xmm0, xmmword [ecx + 8]
mov dword [ecx + 4], 0
mov dword [ecx], 0
cmp edx, 1
je 0x4c4aa9
xorps xmm0, xmm0
mov ecx, esp
movaps xmmword [esp], xmm0
push 0x10
push ecx
mov esi, eax
call dword [sym.imp.bcryptprimitives.dll_ProcessPrng]
movaps xmm0, xmmword [esp]
mov eax, esi
mov dword [eax + 4], 0
mov dword [eax], 1
movups xmmword [eax + 8], xmm0
add eax, 8
lea esp, [ebp - 4]
pop esi
pop ebp
ret
push esi
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x4c4a04
jmp 0x4c4a0f
push esi
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x4c4a2a
xor eax, eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret
push esi
mov esi, eax
call fcn.004ff550
add esp, 4
mov ecx, eax
mov eax, esi
jmp 0x4c4a64
push 0x20
push 8
call fcn.00500210
int3
Function at 0x4c4b20
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x4c5ed0
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, dword [esi]
test eax, eax
je 0x4c4c2d
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x4c4b71
cmp dword [eax + 4], 0
jne 0x4c4c28
mov eax, dword [esi]
test eax, eax
je 0x4c4c4b
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x4c4c64
test eax, eax
jne 0x4c4bdb
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], esi
movzx eax, byte [0x5781b1]
push 4
push 0xc
call fcn.00402ce0
add esp, 8
test eax, eax
je 0x4c4c8c
mov ecx, dword [ebp - 0x20]
movsd xmm0, qword [ebp - 0x28]
mov dword [eax + 8], ecx
movsd qword [eax], xmm0
mov ecx, dword [esi]
test ecx, ecx
je 0x4c4c78
dec ecx
push eax
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, esi
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x4c4bf3
mov ecx, dword [edx]
mov dword [edx], 0
test ecx, ecx
je 0x4c4bf5
mov ecx, dword [edx + 4]
jmp 0x4c4bf5
xor ecx, ecx
mov esi, dword [eax + 4]
mov edx, dword [eax + 8]
test esi, esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], edx
mov dword [eax + 4], 1
mov dword [eax + 8], ecx
je 0x4c4c28
test edx, edx
je 0x4c4c28
lock dec dword [edx]
jne 0x4c4c28
lea ecx, [ebp - 0x24]
push ecx
mov esi, eax
call fcn.004178d0
mov eax, esi
add esp, 4
add eax, 8
jmp 0x4c4c66
push esi
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x4c4b67
jmp 0x4c4b71
push esi
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x4c4b8c
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
push esi
mov esi, eax
call fcn.004ff550
add esp, 4
mov ecx, eax
mov eax, esi
jmp 0x4c4bcf
mov dword [ebp - 0x10], 0
push 0xc
push 4
call fcn.00500210
add esp, 8
ud2
Function at 0x4c56b0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x4c5f30
lea eax, [ebp - 0x18]
mov ebx, dword [ebp + 0x10]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
movzx eax, byte [0x5781b1]
push 4
push 8
call fcn.00402ce0
add esp, 8
test eax, eax
je 0x4c5792
mov esi, eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov dword [esi], ebx
mov dword [esi + 4], ecx
push 0
push 0x10000
push esi
push 0x4c5810
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4c572d
mov dword [edi + 4], eax
mov byte [edi], 4
jmp 0x4c577f
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x24], eax
push eax
mov dword [ebp - 0x20], ecx
call dword [ecx]
add esp, 4
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp + 8]
mov eax, dword [ecx + 4]
test eax, eax
je 0x4c5764
push dword [ecx + 8]
push eax
push dword [ebp - 0x24]
call fcn.00402cf0
add esp, 0xc
push 4
push 8
push dword [ebp - 0x28]
call fcn.00402cf0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [edi], 0
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, edi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x10], 0
push 8
push 4
call fcn.00500210
add esp, 8
ud2
Function at 0x4c5b10
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x4c5f50
mov esi, ecx
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, dword [0x57806c]
test eax, eax
je 0x4c5c27
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x4c5b63
cmp dword [eax + 4], 0
jne 0x4c5c22
mov eax, dword [0x57806c]
test eax, eax
je 0x4c5c49
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x4c5c66
test eax, eax
jne 0x4c5bd8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0x57806c
movzx eax, byte [0x5781b1]
push 4
push 0xc
call fcn.00402ce0
add esp, 8
test eax, eax
je 0x4c5c92
mov ecx, dword [ebp - 0x20]
movsd xmm0, qword [ebp - 0x28]
mov dword [eax + 8], ecx
movsd qword [eax], xmm0
mov ecx, dword [0x57806c]
test ecx, ecx
je 0x4c5c7a
dec ecx
push eax
push ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, edi
test esi, esi
je 0x4c5bed
mov ecx, dword [esi]
mov dword [esi], 0
test ecx, ecx
je 0x4c5bef
mov ecx, dword [esi + 4]
jmp 0x4c5bef
xor ecx, ecx
mov esi, dword [eax + 4]
mov edx, dword [eax + 8]
test esi, esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], edx
mov dword [eax + 4], 1
mov dword [eax + 8], ecx
je 0x4c5c22
test edx, edx
je 0x4c5c22
lock dec dword [edx]
jne 0x4c5c22
lea ecx, [ebp - 0x24]
push ecx
mov esi, eax
call fcn.00417770
mov eax, esi
add esp, 4
add eax, 8
jmp 0x4c5c68
push 0x57806c
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x4c5b59
jmp 0x4c5b63
push 0x57806c
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x4c5b81
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x57806c
mov edi, eax
call fcn.004ff550
add esp, 4
mov ecx, eax
mov eax, edi
jmp 0x4c5bcc
mov dword [ebp - 0x10], 0
push 0xc
push 4
call fcn.00500210
add esp, 8
ud2
Function at 0x4c5cd0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
mov eax, dword [0x57807c]
mov esi, ecx
test eax, eax
je 0x4c5cf6
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jb 0x4c5d0f
cmp byte [eax + 4], 0
je 0x4c5d0f
add eax, 5
pop esi
pop edi
ret
push 0x57807c
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
jae 0x4c5cea
mov eax, dword [0x57807c]
test eax, eax
je 0x4c5d85
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x4c5d9e
test eax, eax
jne 0x4c5d61
movzx eax, byte [0x5781b1]
push 4
push 8
call fcn.00402ce0
add esp, 8
test eax, eax
je 0x4c5db8
mov dword [eax], 0x57807c
mov byte [eax + 4], 0
mov ecx, dword [0x57807c]
test ecx, ecx
je 0x4c5da3
dec ecx
push eax
push ecx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, edi
xor ecx, ecx
test esi, esi
je 0x4c5d76
cmp byte [esi], 0
mov byte [esi], 0
movzx edx, byte [esi + 1]
cmove edx, ecx
mov ecx, edx
lea edx, [eax + 5]
mov byte [eax + 4], 1
mov byte [eax + 5], cl
mov eax, edx
pop esi
pop edi
ret
push 0x57807c
call fcn.004ff550
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x4c5d25
xor eax, eax
pop esi
pop edi
ret
push 0x57807c
mov edi, eax
call fcn.004ff550
add esp, 4
mov ecx, eax
mov eax, edi
jmp 0x4c5d55
push 8
push 4
call fcn.00500210
int3

Function at 0x4c6020
Capabilities:
Set socket configuration

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
xor ebp, ebp
cmp ecx, 0x3b9aca00
je 0x4c6098
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov ebx, 0x3e8
mul ebx
mov ebp, eax
mov eax, edi
seto byte [esp + 3]
mul ebx
mov ebx, edx
mov edi, eax
add ebx, ebp
mov ebp, 0xffffffff
setb al
or al, byte [esp + 3]
jne 0x4c6098
mov edx, 0x431bde83
mov eax, ecx
mul edx
shr edx, 0x12
add edi, edx
adc ebx, 0
jb 0x4c6098
imul eax, edx, 0xf4240
xor edx, edx
sub ecx, eax
setne dl
add edi, edx
adc ebx, 0
jb 0x4c6098
xor ebp, ebp
neg ebx
sbb ebp, ebp
or ebp, edi
je 0x4c60e1
mov eax, dword [esp + 0x20]
lea ecx, [esp + 4]
mov dword [esp + 4], ebp
push 4
push ecx
push 0x1006
push 0xffff
push dword [eax]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov cl, 4
cmp eax, 0xffffffff
jne 0x4c60d5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
mov byte [esi + 3], 0
mov word [esi + 1], 0
mov dword [esi + 4], eax
mov byte [esi], cl
mov eax, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
mov byte [esi], 2
mov dword [esi + 4], 0x565a20
jmp 0x4c60d7
Function at 0x4c60f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
xor ebp, ebp
cmp ecx, 0x3b9aca00
je 0x4c6168
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov ebx, 0x3e8
mul ebx
mov ebp, eax
mov eax, edi
seto byte [esp + 3]
mul ebx
mov ebx, edx
mov edi, eax
add ebx, ebp
mov ebp, 0xffffffff
setb al
or al, byte [esp + 3]
jne 0x4c6168
mov edx, 0x431bde83
mov eax, ecx
mul edx
shr edx, 0x12
add edi, edx
adc ebx, 0
jb 0x4c6168
imul eax, edx, 0xf4240
xor edx, edx
sub ecx, eax
setne dl
add edi, edx
adc ebx, 0
jb 0x4c6168
xor ebp, ebp
neg ebx
sbb ebp, ebp
or ebp, edi
je 0x4c61b1
mov eax, dword [esp + 0x20]
lea ecx, [esp + 4]
mov dword [esp + 4], ebp
push 4
push ecx
push 0x1005
push 0xffff
push dword [eax]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov cl, 4
cmp eax, 0xffffffff
jne 0x4c61a5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
mov byte [esi + 3], 0
mov word [esi + 1], 0
mov dword [esi + 4], eax
mov byte [esi], cl
mov eax, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
mov byte [esi], 2
mov dword [esi + 4], 0x565a20
jmp 0x4c61a7

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

Disassembly:
push esi
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, bind
cmp eax, 0x7fffffff
cmovb edx, eax
push 2
push edx
push dword [esp + 0x18]
push dword [ecx]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4c6200
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
xor eax, eax
cmp ecx, 0x274a
jne 0x4c620a
mov dword [esi + 4], eax
mov byte [esi], 4
mov eax, esi
pop esi
ret
mov dword [esi + 4], ecx
mov dword [esi], 0
mov eax, esi
pop esi
ret

Function at 0x4c6220
Capabilities:
Set socket configuration

Disassembly:
push esi
push eax
movzx ecx, byte [esp + 0x14]
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov dword [esp], ecx
mov ecx, esp
push 4
push ecx
push 1
push 6
push dword [eax]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov cl, 4
cmp eax, 0xffffffff
jne 0x4c625f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
mov byte [esi + 3], 0
mov word [esi + 1], 0
mov dword [esi + 4], eax
mov byte [esi], cl
mov eax, esi
add esp, 4
pop esi
ret

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

Disassembly:
push esi
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, bind
cmp eax, 0x7fffffff
cmovb edx, eax
push 0
push edx
push dword [esp + 0x18]
push dword [ecx]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4c62b0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
xor eax, eax
cmp ecx, 0x274a
jne 0x4c62ba
mov dword [esi + 4], eax
mov byte [esi], 4
mov eax, esi
pop esi
ret
mov dword [esi + 4], ecx
mov dword [esi], 0
mov eax, esi
pop esi
ret
Function at 0x4c62d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push edi
push esi
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 4]
mov ebx, dword [edi + 8]
mov ecx, eax
sub ecx, ebx
jb 0x4c633e
cmp ecx, 0x7fffffff
mov edx, bind
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
cmovb edx, ecx
mov ecx, dword [edi]
add ecx, ebx
push 0
push edx
push ecx
push dword [eax]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x4c6320
add eax, ebx
mov dword [edi + 8], eax
mov ecx, dword [edi + 0xc]
cmp ecx, eax
cmova eax, ecx
mov dword [edi + 0xc], eax
jmp 0x4c632d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x274a
jne 0x4c6336
mov byte [esi], 4
mov eax, esi
pop esi
pop edi
pop ebx
ret
mov byte [esi], 0
mov dword [esi + 4], eax
jmp 0x4c6330
push 0x565ac8
push eax
push ebx
call fcn.00500410
int3

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

Disassembly:
push esi
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 8]
mov eax, dword [esp + 0xc]
mov edx, bind
cmp ecx, 0x7fffffff
cmovb edx, ecx
push 0
push edx
push dword [esp + 0x18]
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4c63fa
mov dword [esi + 4], eax
mov al, 4
mov byte [esi], al
mov eax, esi
pop esi
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov byte [esi + 3], 0
mov word [esi + 1], 0
mov dword [esi + 4], eax
xor eax, eax
mov byte [esi], al
mov eax, esi
pop esi
ret

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

Disassembly:
push edi
push esi
push eax
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov dword [esp], 0
mov edi, esp
push 0
push 0
push 0
push edi
push edx
push eax
push dword [ecx]
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
je 0x4c645d
mov eax, dword [esp]
mov dword [esi + 4], eax
mov byte [esi], 4
jmp 0x4c646c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi + 4], eax
mov dword [esi], 0
mov eax, esi
add esp, 4
pop esi
pop edi
ret

Function at 0x4c6510
Capabilities:
Set socket configuration

Disassembly:
push esi
push eax
movzx ecx, byte [esp + 0x14]
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov dword [esp], ecx
mov ecx, esp
push ecx
push 0x8004667e
push dword [eax]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x4c6541
mov byte [esi], 4
mov eax, esi
add esp, 4
pop esi
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi + 4], eax
mov dword [esi], 0
mov eax, esi
add esp, 4
pop esi
ret