joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10100780
Capabilities:
Get thread local storage value

Disassembly:
mov eax, 8
call fcn.1026b810
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x10347a50]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [esp + 0x14]
lea edx, [edi + 8]
xor ecx, ecx
cmp dword [edx], esi
je 0x101007c5
inc ecx
add edx, 0xc
cmp ecx, 0xa
jl 0x101007b2
pop edi
pop esi
add esp, 8
ret
lea eax, [ecx + ecx*2]
add dword [edi + eax*4 + 4], 0xffffffff
push ebx
lea ebx, [edi + eax*4]
jne 0x10100844
mov eax, dword [ebx]
mov dword [esp + 0xc], eax
push ebp
nop word [eax + eax]
mov esi, dword [eax]
mov ebp, esi
mov edi, dword [eax + 4]
sub ebp, 1
mov ecx, edi
mov dword [esp + 0x14], edi
mov edx, edi
sbb ecx, 0
mov edi, dword [esp + 0x10]
mov eax, esi
push ebx
mov ebx, ebp
lock cmpxchg8b qword [edi]
mov ebp, ebx
pop ebx
mov edi, dword [esp + 0x14]
cmp eax, esi
mov eax, dword [esp + 0x10]
jne 0x101007e0
cmp edx, edi
jne 0x101007e0
test ecx, ecx
jg 0x10100836
jl 0x1010081f
test ebp, ebp
jae 0x10100836
push 0x10c
push str.crypto_threads_win.c
push str.assertion_failed:_ret___0
call fcn.1014bd40
add esp, 0xc
mov dword [ebx], 0
mov dword [ebx + 8], 0
pop ebp
pop ebx
pop edi
pop esi
add esp, 8
ret

Function at 0x101058e0
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov eax, 4
call fcn.1026b810
push edi
mov edi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
test edi, edi
je 0x10105960
mov cl, byte [edi]
test cl, cl
je 0x10105960
push ebx
push esi
mov ebx, 0x100
nop word [eax + eax]
movd xmm1, dword [esp + 0xc]
lea edi, [edi + 1]
movsx esi, cl
mov edx, 0x20
or esi, ebx
add ebx, 0x100
mov ecx, esi
shr ecx, 2
xor ecx, esi
imul esi, esi
and ecx, 0xf
sub edx, ecx
shl eax, cl
mov cl, byte [edi]
movd xmm0, edx
psrlq xmm1, xmm0
movd edx, xmm1
or eax, edx
xor eax, esi
mov dword [esp + 0xc], eax
test cl, cl
jne 0x10105910
pop esi
mov ecx, eax
pop ebx
shr ecx, 0x10
xor eax, ecx
pop edi
pop ecx
ret
xor eax, eax
pop edi
pop ecx
ret

Function at 0x10105a10
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov eax, 4
call fcn.1026b810
push edi
mov edi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
test edi, edi
je 0x10105a93
mov cl, byte [edi]
test cl, cl
je 0x10105a93
push ebx
push esi
mov ebx, 0x100
nop word [eax + eax]
movd xmm1, dword [esp + 0xc]
lea edi, [edi + 1]
movsx esi, cl
mov edx, 0x20
and esi, 0xffffffdf
or esi, ebx
add ebx, 0x100
mov ecx, esi
shr ecx, 2
xor ecx, esi
imul esi, esi
and ecx, 0xf
sub edx, ecx
shl eax, cl
mov cl, byte [edi]
movd xmm0, edx
psrlq xmm1, xmm0
movd edx, xmm1
or eax, edx
xor eax, esi
mov dword [esp + 0xc], eax
test cl, cl
jne 0x10105a40
pop esi
mov ecx, eax
pop ebx
shr ecx, 0x10
xor eax, ecx
pop edi
pop ecx
ret
xor eax, eax
pop edi
pop ecx
ret
Function at 0x10128640
Capabilities:
Check if file exists

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x14]
push edi
push dword [esp + 0x14]
call fcn.1017a0e0
push 0x62
push edi
mov ebx, eax
call fcn.1026d350
add esp, 0x10
neg eax
sbb esi, esi
and esi, 0xfffffff0
add esi, 0x11
test ebx, ebx
jne 0x101286f2
call fcn.10105aa0
push str.BIO_new_file
push 0x43
push str.crypto_bio_bss_file.c
call fcn.10105ba0
add esp, 0xc
push edi
push dword [esp + 0x14]
push str.calling_fopen__s___s_
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 2
call fcn.10105cb0
add esp, 0x14
call fcn.10277757
cmp dword [eax], 2
je 0x101286c2
call fcn.10277757
cmp dword [eax], 6
je 0x101286c2
mov esi, 0x80002
lea edi, [ebx + 0x4d]
jmp 0x101286ca
mov esi, 0x80
lea edi, [esi - 0x35]
call fcn.10105aa0
push str.BIO_new_file
push edi
push str.crypto_bio_bss_file.c
call fcn.10105ba0
push 0
push esi
push 0x20
call fcn.10105cb0
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
ret
push 0x102c65a8
call fcn.100fded0
mov edi, eax
add esp, 4
test edi, edi
jne 0x10128714
push ebx
call fcn.10272419
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
ret
push 0
push edi
call fcn.100fd710
push ebx
push esi
push 0x6a
push edi
call fcn.100fd740
add esp, 0x18
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x10131280
Capabilities:
Get common file path

Disassembly:
mov eax, 0x230
call fcn.1026b810
mov eax, dword [0x10343c80]
xor eax, esp
mov dword [esp + 0x22c], eax
cmp dword [0x10347c34], 0
mov dword [esp], 0x102c79b0
mov dword [esp + 4], 0x10130c80
mov dword [esp + 8], str.getnameinfo
mov dword [esp + 0xc], 0x10131030
mov dword [esp + 0x10], 0x102c79c8
mov dword [esp + 0x14], 0x10130c30
jne 0x101313e6
push 0x104
lea eax, [esp + 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x101313dc
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x2c]
push 0x10c
push eax
call fcn.1027f566
push str.ws2_32
lea eax, [esp + 0x38]
push 0x10c
push eax
call fcn.1027f5c0
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea eax, [esp + 0x40]
add esp, 0x18
push eax
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test edi, edi
je 0x1013134f
push 0x102c79b0
push edi
call ebx
test eax, eax
jne 0x10131396
push edi
call ebp
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x2c]
push 0x10c
push eax
call fcn.1027f566
push str.wship6
lea eax, [esp + 0x38]
push 0x10c
push eax
call fcn.1027f5c0
add esp, 0x18
lea eax, [esp + 0x28]
push eax
call esi
mov edi, eax
test edi, edi
je 0x101313d8
push 0x102c79b0
push edi
call ebx
test eax, eax
je 0x101313d5
xor esi, esi
lea eax, [esp + 0x10]
nop dword [eax]
push dword [eax + esi*8]
push edi
call ebx
mov dword [esp + esi*8 + 0x14], eax
test eax, eax
je 0x101313d5
inc esi
lea eax, [esp + 0x10]
cmp esi, 3
jl 0x101313a0
mov eax, dword [esp + 0x14]
mov dword [0x10342034], eax
mov eax, dword [esp + 0x1c]
mov dword [0x1034203c], eax
mov eax, dword [esp + 0x24]
mov dword [0x10342044], eax
jmp 0x101313d8
push edi
call ebp
pop edi
pop esi
pop ebp
pop ebx
mov dword [0x10347c34], 1
movzx eax, word [esp + 0x234]
mov ecx, dword [esp + 0x22c]
xor ecx, esp
mov eax, dword [eax*8 + 0x10342034]
call fcn.1026af9a
add esp, 0x230
ret 4
Function at 0x10131410
Capabilities:
Resolve dns

Disassembly:
mov eax, 0x820
call fcn.1026b810
mov eax, dword [0x10343c80]
xor eax, esp
mov dword [esp + 0x81c], eax
push ebx
mov ebx, dword [esp + 0x83c]
lea eax, [esp + 0x19]
push ebp
push esi
mov esi, dword [esp + 0x830]
push edi
push 0x400
push 0
push eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], 0
mov byte [esp + 0x30], 0
call fcn.1026d1f0
push 0x400
lea eax, [esp + 0x439]
mov byte [esp + 0x438], 0
push 0
push eax
call fcn.1026d1f0
push 0x400
push esi
lea eax, [esp + 0x44]
push 0x401
push eax
mov dword [esp + 0x3c], eax
lea ebp, [esp + 0x450]
call fcn.1027f6da
add esp, 0x28
nop
push esi
mov edi, ebx
mov dword [ebx], 0
mov byte [ebp], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x101315ef
cmp word [ebx + 8], 2
jne 0x10131512
cmp word [ebx + 0xa], 4
jne 0x10131512
mov esi, dword [ebx + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x10131512
nop dword [eax]
nop dword [eax + eax]
push dword [eax]
push dword [esp + 0x844]
push dword [esp + 0x844]
push dword [esp + 0x844]
call fcn.10131640
mov dword [edi], eax
test eax, eax
je 0x101315e8
add esi, 4
lea edi, [eax + 0x1c]
mov eax, dword [esi]
test eax, eax
jne 0x101314e0
push 0x400
push dword [ebx]
push 0x401
push ebp
call fcn.1027f6da
mov ebx, dword [esp + 0x28]
xor esi, esi
add esp, 0x10
cmp dword [ebx], esi
jne 0x1013159f
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10131536
sub ecx, edx
je case.0x101315ff.11003
mov edi, dword [esp + 0x14]
mov ecx, ebp
mov eax, edi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10131570
test dl, dl
je 0x1013156c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10131570
add eax, 2
add ecx, 2
test dl, dl
jne 0x10131550
xor eax, eax
jmp 0x10131575
sbb eax, eax
or eax, 1
test eax, eax
je case.0x101315ff.11003
mov esi, dword [esp + 0x10]
inc esi
mov dword [esp + 0x10], esi
cmp esi, 0x10
je case.0x101315ff.11003
mov esi, dword [esp + 0x1c]
mov eax, edi
mov dword [esp + 0x14], ebp
mov ebp, eax
jmp 0x101314a0
mov esi, 0x2afb
jmp 0x10131612
cmp dword [esp + 0x844], esi
je 0x10131612
mov ecx, ebp
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101315b0
sub ecx, edx
lea ebx, [ecx + 1]
push ebx
push 1
call fcn.1027ba18
mov edi, eax
add esp, 8
test edi, edi
je 0x101315d8
push ebp
push ebx
push edi
call fcn.1027f566
add esp, 0xc
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
mov dword [eax + 0x14], edi
mov eax, dword [ecx]
cmp dword [eax + 0x14], esi
jne 0x10131612
mov esi, 8
jmp 0x10131612
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x101315ff.11001
jmp dword [eax*4 + 0x10131630]
mov esi, 0x2afa
jmp 0x10131612
mov esi, 0x2af9
mov ecx, dword [esp + 0x82c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1026af9a
add esp, 0x820
ret 0x18
Function at 0x10131e70
Capabilities:
Create thread

Disassembly:
push esi
push edi
push 0x27
push str.crypto_thread_arch_thread_win.c
push 4
call fcn.10101f20
mov edi, dword [esp + 0x18]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10131eb4
push 0
push 0
push edi
push 0x10131ed0
push 0
push 0
call fcn.1027752f
add esp, 0x18
mov dword [esi], eax
test eax, eax
je 0x10131eb4
mov dword [edi + 0x10], esi
mov eax, 1
pop edi
pop esi
ret
push 0x34
push str.crypto_thread_arch_thread_win.c
push esi
mov dword [edi + 0x10], 0
call fcn.10101d20
add esp, 0xc
xor eax, eax
pop edi
pop esi
ret

Function at 0x10132220
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
push esi
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
lea edx, [eax - 1]
not eax
shr edx, 0x1f
shr eax, 0x1f
and edx, eax
mov eax, dword [ebx + 4]
mov ecx, dword [ebp + 4]
dec edx
xor eax, ecx
mov dword [esp + 0x10], edx
and eax, edx
xor ecx, eax
mov dword [ebp + 4], ecx
xor dword [ebx + 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebx + 0xc]
xor eax, ecx
movd xmm0, edx
and eax, edx
pshufd xmm4, xmm0, 0
xor ecx, eax
mov dword [ebp + 0xc], ecx
xor dword [ebx + 0xc], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x10]
xor eax, ecx
and eax, edx
and eax, 4
xor ecx, eax
mov dword [ebp + 0x10], ecx
xor dword [ebx + 0x10], eax
xor eax, eax
mov esi, dword [esp + 0x1c]
test esi, esi
jle 0x10132336
push edi
cmp esi, 4
jb 0x10132311
mov ecx, dword [ebp]
lea edi, [esi - 1]
mov edx, dword [ebx]
lea ebp, [esi - 1]
lea ebp, [ecx + ebp*4]
cmp edx, ebp
lea edi, [edx + edi*4]
mov ebp, dword [esp + 0x18]
ja 0x101322b4
cmp edi, ecx
jae 0x10132311
cmp edx, ebx
ja 0x101322bc
cmp edi, ebx
jae 0x10132311
cmp edx, ebp
ja 0x101322c4
cmp edi, ebp
jae 0x10132311
lea edi, [esi - 1]
lea edi, [ecx + edi*4]
cmp ecx, ebx
ja 0x101322d2
cmp edi, ebx
jae 0x10132311
cmp ecx, ebp
ja 0x101322da
cmp edi, ebp
jae 0x10132311
mov edi, esi
and edi, 0xfffffffc
nop
movups xmm3, xmmword [edx + eax*4]
movups xmm2, xmmword [ecx + eax*4]
movaps xmm1, xmm3
xorps xmm1, xmm2
andps xmm1, xmm4
movaps xmm0, xmm1
xorps xmm1, xmm3
xorps xmm0, xmm2
movups xmmword [ecx + eax*4], xmm0
movups xmmword [edx + eax*4], xmm1
add eax, 4
cmp eax, edi
jl 0x101322e0
mov dword [esp + 0x18], eax
cmp eax, esi
jge 0x10132335
mov ecx, dword [ebp]
mov edx, dword [ecx + eax*4]
lea esi, [ecx + eax*4]
mov ecx, dword [ebx]
mov edi, dword [ecx + eax*4]
xor edi, edx
and edi, dword [esp + 0x14]
xor edx, edi
mov dword [esi], edx
mov ecx, dword [ebx]
xor dword [ecx + eax*4], edi
inc eax
cmp eax, dword [esp + 0x20]
jl 0x10132311
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x10132d00
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov eax, 0x24
call fcn.1026b810
push ebx
push esi
push edi
mov edi, dword [esp + 0x34]
xor ecx, ecx
push edi
mov dword [esp + 0x14], 0
xor ebx, ebx
mov dword [esp + 0x10], ecx
call fcn.10132670
mov esi, eax
add esp, 4
lea eax, [esi + 7]
cdq
and edx, 7
lea ecx, [edx + eax]
sar ecx, 3
cmp dword [esp + 0x44], ebx
jne 0x10132d71
mov ebx, dword [edi + 0xc]
mov eax, ebx
neg eax
sbb eax, eax
and eax, 0xff
mov dword [esp + 0x10], eax
lea eax, [ecx*8]
cmp eax, esi
jne 0x10132d69
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 0xc], eax
jmp 0x10132d73
mov eax, ebx
mov dword [esp + 0xc], eax
jmp 0x10132d73
xor eax, eax
mov esi, dword [esp + 0x3c]
add eax, ecx
cmp esi, 0xffffffff
jne 0x10132db1
mov esi, eax
mov dword [esp + 0x3c], esi
mov ecx, dword [edi + 8]
shl ecx, 2
test ecx, ecx
jne 0x10132e30
test esi, esi
je 0x10132ec4
push esi
push ecx
push dword [esp + 0x40]
call fcn.1026d1f0
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x24
ret
cmp esi, eax
jge 0x10132d84
movups xmm0, xmmword [edi]
mov eax, dword [edi + 0x10]
mov dword [esp + 0x2c], eax
movups xmmword [esp + 0x1c], xmm0
psrldq xmm0, 4
movd ecx, xmm0
test ecx, ecx
jle 0x10132df2
mov eax, dword [esp + 0x1c]
lea eax, [eax + ecx*4]
nop dword [eax + eax]
cmp dword [eax - 4], 0
lea eax, [eax - 4]
jne 0x10132dee
dec ecx
test ecx, ecx
jg 0x10132de0
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x28]
xor edx, edx
test ecx, ecx
cmove eax, edx
mov dword [esp + 0x28], eax
lea eax, [esp + 0x1c]
push eax
call fcn.10132670
add eax, 7
add esp, 4
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, dword [esp + 0xc]
cmp esi, eax
jge 0x10132d84
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x24
ret
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
cmp edx, 1
je 0x10132e40
dec eax
add eax, esi
mov edi, dword [edi + 4]
mov dword [esp + 0x44], eax
xor eax, eax
cmp edx, 1
push ebp
sete al
shl edi, 2
xor ebp, ebp
lea eax, [eax*2 - 1]
mov dword [esp + 0x18], eax
lea eax, [ecx - 1]
mov dword [esp + 0x1c], eax
test esi, esi
je 0x10132ec3
mov dword [esp + 0x10], esi
neg edi
mov esi, dword [esp + 0x38]
mov eax, dword [esi]
mov edx, ebp
shr edx, 2
mov ecx, ebp
and ecx, 3
shl ecx, 3
mov edx, dword [eax + edx*4]
mov eax, edi
shr edx, cl
mov ecx, ebp
shr eax, 0x1f
neg al
and dl, al
mov eax, dword [esp + 0x48]
xor dl, byte [esp + 0x14]
add bl, dl
cmp bl, dl
mov byte [eax], bl
sbb ebx, ebx
sub ecx, dword [esp + 0x1c]
add eax, dword [esp + 0x18]
neg ebx
shr ecx, 0x1f
inc edi
add ebp, ecx
mov dword [esp + 0x48], eax
sub dword [esp + 0x10], 1
jne 0x10132e75
mov esi, dword [esp + 0x40]
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x24
ret
Function at 0x10149c90
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x14
call fcn.1026b810
mov edx, dword [esp + 0x18]
xor eax, eax
push ebx
mov ebx, dword [esp + 0x34]
or ecx, 0xffffffff
push ebp
mov ebp, dword [esp + 0x34]
cmp ebp, 1
push esi
mov esi, dword [edx]
setne al
add eax, ebx
mov dword [esp + 0x1c], esi
cmp eax, esi
jbe 0x10149cc9
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
cmp ebp, 1
je 0x10149d92
mov ecx, dword [esp + 0x2c]
dec ecx
add ecx, esi
cmp dword [esp + 0x40], 0
mov dword [esp + 0x10], ecx
mov cl, byte [ecx]
mov byte [esp + 0xf], cl
movzx ebp, cl
je 0x10149d00
sub esi, ebp
mov eax, 1
sub esi, ebx
dec esi
mov dword [edx], esi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
lea ecx, [eax + ebp]
mov ebx, esi
sub ebx, ecx
mov eax, esi
xor ebx, ecx
xor eax, ecx
or ebx, eax
mov eax, 0x100
xor ebx, esi
shr ebx, 0x1f
dec ebx
cmp esi, eax
push edi
cmovb eax, esi
xor edi, edi
mov dword [esp + 0x18], eax
test eax, eax
je 0x10149d75
mov esi, dword [esp + 0x14]
mov edx, ebp
shr edx, 0x1f
mov dword [esp + 0x1c], edx
mov eax, ebp
lea esi, [esi - 1]
sub eax, edi
mov ecx, edi
shr ecx, 0x1f
inc edi
shr eax, 0x1f
xor al, cl
xor cl, dl
or al, cl
movzx ecx, byte [esi + 1]
dec al
movzx edx, al
movzx eax, byte [esp + 0x13]
xor ecx, eax
and edx, ecx
not edx
and ebx, edx
mov edx, dword [esp + 0x1c]
cmp edi, dword [esp + 0x18]
jb 0x10149d37
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
not ebx
lea eax, [ebp + 1]
mov ebp, dword [esp + 0x3c]
movzx ecx, bl
mov ebx, dword [esp + 0x40]
dec ecx
shr ecx, 0x1f
neg ecx
and eax, ecx
sub esi, eax
mov dword [edx], esi
pop edi
push dword [esp + 0x44]
push ecx
push ebx
push ebp
push dword [esp + 0x44]
push dword [esp + 0x44]
push dword [esp + 0x44]
push dword [esp + 0x44]
push edx
call fcn.10149970
add esp, 0x24
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x1014b8a0
Capabilities:
Initialize winsock library

Disassembly:
cmp dword [0x10347ce0], 0
jne 0x1014b939
push 0x190
push 0
push 0x10347ce8
mov dword [0x10347ce0], 1
call fcn.1026d1f0
add esp, 0xc
push 0x10347ce8
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1014b939
call fcn.10105aa0
push str.BIO_sock_init
push 0x99
push str.crypto_bio_bio_sock.c
call fcn.10105ba0
add esp, 0xc
push str.calling_wsastartup__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.10105cb0
call fcn.10105aa0
push str.BIO_sock_init
push 0x9b
push str.crypto_bio_bio_sock.c
call fcn.10105ba0
push 0
push 0x7a
push 0x20
call fcn.10105cb0
add esp, 0x24
or eax, 0xffffffff
ret
mov eax, 1
ret

Function at 0x1014b940
Capabilities:
Set socket configuration

Disassembly:
mov eax, dword [esp + 8]
push esi
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push 0x8004667e
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
test esi, esi
jns 0x1014b995
call fcn.10105aa0
push str.BIO_socket_ioctl
push 0xf7
push str.crypto_bio_bio_sock.c
call fcn.10105ba0
add esp, 0xc
push str.calling_ioctlsocket__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.10105cb0
add esp, 0xc
xor eax, eax
test esi, esi
pop esi
sete al
ret

Function at 0x1014b9a0
Capabilities:
Get socket status

Disassembly:
mov eax, 0x110
call fcn.1026b810
mov eax, dword [0x10343c80]
xor eax, esp
mov dword [esp + 0x10c], eax
push ebp
mov ebp, dword [esp + 0x11c]
push edi
mov edi, dword [esp + 0x11c]
cmp edi, 0x3f
ja 0x1014ba8d
push esi
mov esi, dword [esp + 0x128]
mov eax, esi
or eax, dword [esp + 0x12c]
jne 0x1014ba01
pop esi
pop edi
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x10c]
xor ecx, esp
call fcn.1026af9a
add esp, 0x110
ret
push 0
call fcn.1027ba76
add esp, 4
cmp dword [esp + 0x12c], edx
jg 0x1014ba34
jl 0x1014ba1a
cmp esi, eax
jae 0x1014ba34
pop esi
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x10c]
xor ecx, esp
call fcn.1026af9a
add esp, 0x110
ret
sub esi, eax
mov dword [esp + 0x18], edi
xor ecx, ecx
mov dword [esp + 0x14], 1
lea eax, [esp + 0xc]
mov dword [esp + 0x10], 0
push eax
test ebp, ebp
mov dword [esp + 0x10], esi
push 0
lea eax, [esp + 0x1c]
cmovne eax, ecx
test ebp, ebp
push eax
lea eax, [esp + 0x20]
cmove eax, ecx
push eax
lea eax, [edi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
pop esi
pop edi
pop ebp
mov ecx, dword [esp + 0x10c]
xor ecx, esp
call fcn.1026af9a
add esp, 0x110
ret
mov ecx, dword [esp + 0x114]
or eax, 0xffffffff
pop edi
pop ebp
xor ecx, esp
call fcn.1026af9a
add esp, 0x110
ret
Function at 0x1014c1d0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov eax, 4
call fcn.1026b810
push edi
mov edi, dword [esp + 0xc]
mov dword [esp + 4], 1
cmp edi, 0xffffffff
jne 0x1014c218
call fcn.10105aa0
push str.BIO_connect
push 0x56
push str.crypto_bio_bio_sock2.c
call fcn.10105ba0
push 0
push 0x87
push 0x20
call fcn.10105cb0
add esp, 0x18
xor eax, eax
pop edi
pop ecx
ret
push ebx
mov ebx, dword [esp + 0x18]
mov eax, ebx
shr eax, 3
push esi
and eax, 1
push eax
push edi
call fcn.1014b940
add esp, 8
test eax, eax
je 0x1014c2a7
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
test bl, 4
je 0x1014c2ae
push 4
lea eax, [esp + 0x10]
push eax
push 8
push 0xffff
push edi
call esi
test eax, eax
je 0x1014c2ae
call fcn.10105aa0
push str.BIO_connect
push 0x60
push str.crypto_bio_bio_sock2.c
call fcn.10105ba0
add esp, 0xc
push str.calling_setsockopt__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.10105cb0
call fcn.10105aa0
push str.BIO_connect
push 0x62
push str.crypto_bio_bio_sock2.c
call fcn.10105ba0
push 0
push 0x89
push 0x20
call fcn.10105cb0
add esp, 0x24
pop esi
pop ebx
xor eax, eax
pop edi
pop ecx
ret
test bl, 0x10
je 0x1014c31f
push 4
lea eax, [esp + 0x10]
push eax
push 1
push 6
push edi
call esi
test eax, eax
je 0x1014c31f
call fcn.10105aa0
push str.BIO_connect
push 0x6a
push str.crypto_bio_bio_sock2.c
call fcn.10105ba0
add esp, 0xc
push str.calling_setsockopt__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.10105cb0
call fcn.10105aa0
push str.BIO_connect
push 0x6c
push str.crypto_bio_bio_sock2.c
call fcn.10105ba0
push 0
push 0x8a
push 0x20
call fcn.10105cb0
add esp, 0x24
xor eax, eax
pop esi
pop ebx
pop edi
pop ecx
ret
mov esi, dword [esp + 0x18]
push esi
call fcn.101308c0
add esp, 4
push eax
push esi
call fcn.1012c6c0
add esp, 4
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1014c3b1
push eax
call fcn.101035f0
add esp, 4
test eax, eax
jne 0x1014c2a7
call fcn.10105aa0
push str.BIO_connect
push 0xb2
push str.crypto_bio_bio_sock2.c
call fcn.10105ba0
add esp, 0xc
push str.calling_connect__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.10105cb0
call fcn.10105aa0
push str.BIO_connect
push 0xb4
push str.crypto_bio_bio_sock2.c
call fcn.10105ba0
push 0
push 0x67
push 0x20
call fcn.10105cb0
add esp, 0x24
xor eax, eax
pop esi
pop ebx
pop edi
pop ecx
ret
pop esi
pop ebx
mov eax, 1
pop edi
pop ecx
ret

Function at 0x10153bd0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x10153be4
mov dword [esp + 4], eax
jmp fcn.10132670
or eax, 0xffffffff
ret
Function at 0x101697e0
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov cl, byte [esp + 0x10]
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
movzx eax, cl
and eax, 1
push edi
mov edi, dword [esp + 0x10]
test esi, esi
je 0x10169822
push ebx
add edi, esi
lea ebx, [edx + esi]
movzx edx, byte [edi - 1]
lea edi, [edi - 1]
movzx ecx, cl
lea ebx, [ebx - 1]
xor edx, ecx
mov cl, byte [esp + 0x1c]
add eax, edx
mov byte [ebx], al
shr eax, 8
sub esi, 1
jne 0x10169802
pop ebx
pop edi
pop esi
ret

Function at 0x1016cfe0
Capabilities:
Generate random numbers via winapi

Disassembly:
mov eax, 4
call fcn.1026b810
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
push 1
push esi
call fcn.1016ccb0
mov ebx, eax
push ebx
push esi
call fcn.1016cbc0
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x1016d05f
push 0xf0000040
push 1
xor edi, edi
lea eax, [esp + 0x18]
push edi
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1016d043
push ebp
push ebx
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [esp + 0x14]
test eax, eax
cmovne edi, ebx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea eax, [edi*8]
push eax
push edi
push esi
call fcn.1016cc50
push esi
call fcn.1016cda0
add esp, 0x10
test eax, eax
jne 0x1016d0d9
push 1
push esi
call fcn.1016ccb0
mov ebx, eax
push ebx
push esi
call fcn.1016cbc0
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x1016d0d0
push 0xf0000040
push 0x16
push str.Intel_Hardware_Cryptographic_Service_Provider
xor edi, edi
lea eax, [esp + 0x1c]
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1016d0b4
push ebp
push ebx
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [esp + 0x14]
test eax, eax
cmovne edi, ebx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea eax, [edi*8]
push eax
push edi
push esi
call fcn.1016cc50
push esi
call fcn.1016cda0
add esp, 0x10
test eax, eax
jne 0x1016d0d9
push esi
call fcn.1016cda0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret