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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x60
mov ecx, dword [esp + 0x80]
mov esi, dword [esp + 0x78]
test ecx, ecx
je 0x46efcc
xor eax, eax
cmp ecx, 0x30
ja 0x46f0ce
movsd xmm0, qword [esi + 0x28]
mov eax, dword [esp + 0x7c]
xor edx, edx
cmp ecx, 0x20
movsd qword [esp + 0x28], xmm0
movsd xmm0, qword [esi + 0x20]
movsd qword [esp + 0x20], xmm0
movsd xmm0, qword [esi + 0x18]
movsd qword [esp + 0x18], xmm0
movsd xmm0, qword [esi + 0x10]
movsd qword [esp + 0x10], xmm0
movsd xmm0, qword [esi]
movsd xmm1, qword [esi + 8]
movsd qword [esp + 8], xmm1
movsd qword [esp], xmm0
jb 0x46efb0
mov edx, ecx
xor esi, esi
and edx, 0xffffffe0
nop word [eax + eax]
movups xmm0, xmmword [eax + esi]
movups xmm2, xmmword [esp + esi]
movups xmm1, xmmword [eax + esi + 0x10]
movups xmm3, xmmword [esp + esi + 0x10]
xorps xmm2, xmm0
xorps xmm3, xmm1
movups xmmword [esp + esi], xmm2
movups xmmword [esp + esi + 0x10], xmm3
add esi, 0x20
cmp edx, esi
jne 0x46ef80
cmp edx, ecx
jne 0x46efb0
mov esi, esp
jmp 0x46efcc
mov esi, esp
nop word cs:[eax + eax]
nop dword [eax]
movzx ebx, byte [eax + edx]
xor byte [esp + edx], bl
inc edx
cmp ecx, edx
jne 0x46efc0
mov edi, dword [esp + 0x74]
lea ebx, [esp + 0x30]
mov eax, dword [edi + 0x108]
lea ebp, [edi + 0xfc]
bswap eax
inc eax
bswap eax
mov dword [edi + 0x108], eax
push edi
push ebx
push ebp
call dword [edi + 0xf4]
add esp, 0xc
mov eax, dword [edi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [edi + 0x108], eax
lea eax, [esp + 0x40]
push edi
push eax
push ebp
call dword [edi + 0xf4]
add esp, 0xc
mov eax, dword [edi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [edi + 0x108], eax
lea eax, [esp + 0x50]
sub esp, 0xc
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [edi + 0xf4]
add esp, 0xc
movups xmm0, xmmword [esi]
movups xmm1, xmmword [esp + 0x30]
xorps xmm1, xmm0
movups xmm0, xmmword [esp + 0x40]
movups xmmword [esp + 0x30], xmm1
movups xmm1, xmmword [esi + 0x10]
xorps xmm1, xmm0
movups xmmword [esp + 0x40], xmm1
movups xmm0, xmmword [esi + 0x20]
movups xmm1, xmmword [esp + 0x50]
xorps xmm1, xmm0
movups xmmword [esp + 0x50], xmm1
push edi
push 0x100
push ebx
call sym.adb.exe_AES_set_encrypt_key
add esp, 0xc
mov dword [edi + 0xf4], sym.adb.exe_AES_encrypt
mov dword [edi + 0xf8], 0
mov eax, 1
movsd xmm0, qword [esp + 0x50]
movsd xmm1, qword [esp + 0x58]
movsd qword [edi + 0x104], xmm1
movsd qword [edi + 0xfc], xmm0
mov dword [edi + 0x114], 0
mov dword [edi + 0x110], 1
add esp, 0x60
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x46f0e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov ebp, dword [esp + 0x44]
xor eax, eax
cmp ebp, 0x30
ja 0x46f1fe
mov eax, dword [ecx + 0x108]
mov edi, edx
mov esi, ecx
lea ebx, [ecx + 0xfc]
bswap eax
inc eax
bswap eax
mov dword [ecx + 0x108], eax
mov eax, esp
push ecx
push eax
push ebx
call dword [ecx + 0xf4]
add esp, 0xc
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
lea eax, [esp + 0x10]
push esi
push eax
push ebx
call dword [esi + 0xf4]
add esp, 0xc
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
lea eax, [esp + 0x20]
sub esp, 0xc
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [esi + 0xf4]
add esp, 0xc
test ebp, ebp
je 0x46f1bc
xor eax, eax
cmp ebp, 0x1f
jbe 0x46f1b0
mov eax, ebp
xor ecx, ecx
and eax, 0xffffffe0
nop
movups xmm0, xmmword [edi + ecx]
movups xmm2, xmmword [esp + ecx]
movups xmm1, xmmword [edi + ecx + 0x10]
movups xmm3, xmmword [esp + ecx + 0x10]
xorps xmm2, xmm0
xorps xmm3, xmm1
movups xmmword [esp + ecx], xmm2
movups xmmword [esp + ecx + 0x10], xmm3
add ecx, 0x20
cmp eax, ecx
jne 0x46f180
cmp eax, ebp
je 0x46f1bc
nop dword [eax]
movzx ecx, byte [edi + eax]
xor byte [esp + eax], cl
inc eax
cmp ebp, eax
jne 0x46f1b0
push esi
push 0x100
lea eax, [esp + 8]
push eax
call sym.adb.exe_AES_set_encrypt_key
add esp, 0xc
mov dword [esi + 0xf4], sym.adb.exe_AES_encrypt
mov dword [esi + 0xf8], 0
lea eax, [esp + 0x20]
movsd xmm0, qword [eax]
movsd xmm1, qword [eax + 8]
mov eax, 1
movsd qword [ebx], xmm0
movsd qword [ebx + 8], xmm1
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4861c0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x486293
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
xor edi, edi
cmp ecx, 7
mov eax, 0
jbe 0x486280
movdqa xmm2, xmmword [0x593e80]
mov edi, ecx
pxor xmm0, xmm0
xor eax, eax
pxor xmm1, xmm1
and edi, 0xfffffff8
nop
movd xmm3, dword [esi + eax]
movd xmm4, dword [esi + eax + 4]
movd xmm5, dword [edx + eax]
movd xmm6, dword [edx + eax + 4]
add eax, 8
cmp edi, eax
punpcklbw xmm3, xmm0
punpcklbw xmm4, xmm0
punpcklbw xmm5, xmm0
punpcklbw xmm6, xmm0
punpcklwd xmm3, xmm0
punpcklwd xmm5, xmm0
punpcklwd xmm4, xmm0
punpcklwd xmm6, xmm0
pxor xmm5, xmm3
pxor xmm6, xmm4
pand xmm5, xmm2
pand xmm6, xmm2
por xmm0, xmm5
por xmm1, xmm6
jne 0x486200
por xmm1, xmm0
cmp edi, ecx
pshufd xmm0, xmm1, 0x4e
por xmm0, xmm1
pshufd xmm1, xmm0, 0xe5
por xmm1, xmm0
movd eax, xmm1
je 0x486295
nop word cs:[eax + eax]
nop dword [eax]
movzx ebx, byte [edx + edi]
xor bl, byte [esi + edi]
inc edi
movzx ebx, bl
or eax, ebx
cmp ecx, edi
jne 0x486280
jmp 0x486295
xor eax, eax
pop esi
pop edi
pop ebx
ret

Function at 0x4862a0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push esi
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x4862d1
mov edx, dword [esp + 8]
mov eax, 0x811c9dc5
nop word cs:[eax + eax]
nop dword [eax]
movzx esi, byte [edx]
inc edx
xor esi, eax
imul eax, esi, 0x1000193
dec ecx
jne 0x4862c0
pop esi
ret
mov eax, 0x811c9dc5
pop esi
ret
Function at 0x49daa0
Capabilities:
Encrypt data using curve25519

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x178
mov esi, dword [esp + 0x190]
lea ebx, [esp + 0x28]
push ebx
push 0x20
push dword [esp + 0x19c]
call sym.adb.exe_SHA512
add esp, 0xc
and byte [esp + 0x28], 0xf8
lea edi, [esp + 0x88]
mov al, byte [esp + 0x47]
and al, 0x3f
or al, 0x40
mov byte [esp + 0x47], al
push 0x596688
push ebx
push edi
call fcn.0049a6b0
add esp, 0xc
movsd xmm2, qword [esp + 0xf0]
movsd xmm1, qword [esp + 0xe8]
movsd xmm0, qword [esp + 0xf8]
lea ebx, [esp + 0x150]
mov edx, esp
mov ecx, ebx
movsd qword [esp + 0x18], xmm2
movsd qword [esp + 0x10], xmm1
movsd xmm2, qword [esp + 0xd8]
movsd xmm1, qword [esp + 0xe0]
movsd qword [esp + 0x20], xmm0
movsd qword [esp + 8], xmm1
movsd qword [esp], xmm2
call fcn.004a37e0
mov ebp, esp
mov edx, edi
mov ecx, ebp
push ebx
call fcn.004a3af0
add esp, 4
lea edi, [esp + 0x128]
lea edx, [esp + 0xb0]
mov ecx, edi
push ebx
call fcn.004a3af0
add esp, 4
mov ebx, dword [esp + 0x18c]
mov edx, edi
mov ecx, ebx
call fcn.00498c40
lea ecx, [esp + 0x68]
mov edx, ebp
call fcn.00498c40
mov al, byte [esp + 0x68]
mov ecx, dword [esp + 0x194]
shl al, 7
xor byte [ebx + 0x1f], al
movsd xmm0, qword [ecx + 0x18]
movsd qword [esi + 0x18], xmm0
movsd xmm0, qword [ecx + 0x10]
movsd qword [esi + 0x10], xmm0
movsd xmm0, qword [ecx]
movsd xmm1, qword [ecx + 8]
movsd qword [esi + 8], xmm1
movsd qword [esi], xmm0
movsd xmm0, qword [ebx]
movsd xmm1, qword [ebx + 8]
movsd qword [esi + 0x20], xmm0
movsd qword [esi + 0x28], xmm1
movsd xmm0, qword [ebx + 0x10]
movsd qword [esi + 0x30], xmm0
movsd xmm0, qword [ebx + 0x18]
movsd qword [esi + 0x38], xmm0
add esp, 0x178
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4a2ab0
Capabilities:
Encrypt data using curve25519

Disassembly:
push ebx
push edi
push esi
sub esp, 0x138
mov eax, dword [esp + 0x14c]
mov esi, dword [esp + 0x148]
lea ecx, [esp + 0x70]
movsd xmm0, qword [eax]
movsd xmm1, qword [eax + 8]
movsd qword [esp], xmm0
movsd xmm0, qword [eax + 0x18]
movsd qword [esp + 0x18], xmm0
movsd xmm0, qword [eax + 0x10]
movsd qword [esp + 8], xmm1
movsd qword [esp + 0x10], xmm0
and byte [esp], 0xf8
mov al, byte [esp + 0x1f]
and al, 0x3f
or al, 0x40
mov byte [esp + 0x1f], al
mov eax, esp
push 0x596688
push eax
push ecx
call fcn.0049a6b0
add esp, 0xc
movdqu xmm2, xmmword [esp + 0x98]
movdqu xmm3, xmmword [esp + 0xa8]
movdqu xmm0, xmmword [esp + 0xd0]
movdqu xmm1, xmmword [esp + 0xc0]
mov ecx, dword [esp + 0xe0]
mov edi, dword [esp + 0xb8]
mov eax, dword [esp + 0xe4]
mov edx, dword [esp + 0xbc]
movdqa xmm4, xmm2
movdqa xmm5, xmm3
lea ebx, [edi + ecx]
add ecx, 0x7fffffe
paddd xmm4, xmm1
paddd xmm1, xmmword [0x5965b0]
paddd xmm5, xmm0
paddd xmm0, xmmword [0x5965c0]
sub ecx, edi
lea edi, [esp + 0x110]
movdqu xmmword [esp + 0x48], xmm4
movdqu xmmword [esp + 0x58], xmm5
mov dword [esp + 0x68], ebx
lea ebx, [edx + eax]
add eax, 0x3fffffe
sub eax, edx
lea edx, [esp + 0x20]
mov dword [esp + 0x6c], ebx
psubd xmm1, xmm2
psubd xmm0, xmm3
movdqu xmmword [esp + 0x20], xmm1
movdqu xmmword [esp + 0x30], xmm0
mov dword [esp + 0x40], ecx
mov ecx, edi
mov dword [esp + 0x44], eax
call fcn.004a37e0
lea edx, [esp + 0x48]
mov ecx, edi
push edi
call fcn.004a3af0
add esp, 4
mov ecx, esi
mov edx, edi
call fcn.00498c40
add esp, 0x138
pop esi
pop edi
pop ebx
ret
Function at 0x4b7930
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4b79db
cmp dword [edi + 4], 0
je 0x4b79db
push 0
call sym.adb.exe_CRYPTO_get_thread_local
add esp, 4
mov esi, eax
test eax, eax
je 0x4b79e7
cmp dword [edi + 4], 0
je 0x4b7a24
xor ebx, ebx
xor ebp, ebp
mov dword [esp], edi
mov edi, dword [edi]
push dword [esi + ebx + 4]
call sym.adb.exe_OPENSSL_free
add esp, 4
mov dword [esi + ebx + 4], 0
mov dword [esi + ebx], 0
mov dword [esi + ebx + 0xc], 0
mov dword [esi + ebx + 8], 0
mov eax, dword [edi + ebx]
mov dword [esi + ebx], eax
mov eax, dword [edi + ebx + 4]
test eax, eax
je 0x4b79b8
push eax
call sym.adb.exe_OPENSSL_strdup
add esp, 4
mov dword [esi + ebx + 4], eax
mov eax, dword [edi + ebx + 8]
inc ebp
mov dword [esi + ebx + 8], eax
movzx eax, word [edi + ebx + 0xc]
mov edi, dword [esp]
mov word [esi + ebx + 0xc], ax
add ebx, 0x10
mov eax, dword [edi + 4]
cmp ebp, eax
jb 0x4b7970
dec eax
jmp 0x4b7a29
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
jmp sym.adb.exe_ERR_clear_error
push 0x10c
call sym.adb.exe_OPENSSL_malloc
add esp, 4
test eax, eax
je 0x4b7a39
mov esi, eax
push 0x10c
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x4b7a50
push esi
push 0
call sym.adb.exe_CRYPTO_set_thread_local
add esp, 0xc
test eax, eax
jne 0x4b795f
jmp 0x4b7a39
mov eax, 0xffffffff
mov dword [esi + 0x100], eax
mov dword [esi + 0x104], 0xf
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4c76d0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
test edi, edi
je 0x4c7726
xor ebp, ebp
nop word [eax + eax]
inc ecx
movzx ecx, cl
mov esi, dword [eax + ecx*4 + 8]
add edx, esi
movzx edx, dl
mov ebx, dword [eax + edx*4 + 8]
mov dword [eax + ecx*4 + 8], ebx
add ebx, esi
mov dword [eax + edx*4 + 8], esi
movzx esi, bl
mov ebx, dword [esp + 0x1c]
movzx ebx, byte [ebx + ebp]
xor bl, byte [eax + esi*4 + 8]
mov esi, dword [esp + 0x20]
mov byte [esi + ebp], bl
inc ebp
cmp edi, ebp
jne 0x4c76f0
mov dword [eax], ecx
mov dword [eax + 4], edx
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4c9b70
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x8c
mov ebx, dword [esp + 0xb4]
mov esi, dword [esp + 0xa0]
mov edi, dword [esp + 0xa4]
push ebx
call sym.adb.exe_EVP_MD_size
add esp, 4
lea ebp, [esp + 0x58]
mov dword [esp + 8], eax
push ebp
call sym.adb.exe_HMAC_CTX_init
add esp, 4
push 0
push ebx
push edi
push esi
push ebp
call sym.adb.exe_HMAC_Init_ex
add esp, 0x14
xor ebx, ebx
test eax, eax
je 0x4c9daa
mov eax, dword [esp + 0xb8]
test eax, eax
je 0x4c9d97
mov ebx, dword [esp + 0xbc]
mov ecx, 1
mov esi, dword [esp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
cmp esi, eax
cmova esi, eax
mov eax, ecx
shr eax, 0x18
mov byte [esp + 4], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 5], al
mov byte [esp + 6], ch
mov byte [esp + 7], cl
push 0
push 0
push 0
push 0
push ebp
call sym.adb.exe_HMAC_Init_ex
add esp, 0x14
test eax, eax
mov edi, ebp
je 0x4c9da6
push dword [esp + 0xac]
push dword [esp + 0xac]
push edi
call sym.adb.exe_HMAC_Update
add esp, 0xc
test eax, eax
je 0x4c9da6
push 4
lea eax, [esp + 8]
push eax
push edi
call sym.adb.exe_HMAC_Update
add esp, 0xc
test eax, eax
je 0x4c9da6
push 0
lea eax, [esp + 0x1c]
push eax
push edi
call sym.adb.exe_HMAC_Final
add esp, 0xc
test eax, eax
je 0x4c9da6
test esi, esi
je 0x4c9c84
push esi
lea eax, [esp + 0x1c]
push eax
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [esp + 0xb0], 2
jb 0x4c9d80
lea ecx, [esp + esi + 0x18]
lea eax, [ebx + esi]
lea edx, [esp + 0x18]
mov ebp, esi
cmp ebx, ecx
setb cl
cmp edx, eax
setb al
and ebp, 0xffffffe0
and al, cl
mov byte [esp + 3], al
mov eax, 1
nop word [eax + eax]
mov dword [esp + 0x14], eax
push 0
push 0
push 0
push 0
lea edi, [esp + 0x68]
push edi
call sym.adb.exe_HMAC_Init_ex
add esp, 0x14
test eax, eax
je 0x4c9da6
push dword [esp + 8]
lea eax, [esp + 0x1c]
push eax
push edi
call sym.adb.exe_HMAC_Update
add esp, 0xc
test eax, eax
je 0x4c9da6
push 0
lea eax, [esp + 0x1c]
push eax
push edi
call sym.adb.exe_HMAC_Final
add esp, 0xc
test eax, eax
je 0x4c9da6
test esi, esi
je 0x4c9d6d
cmp esi, 0x20
setb cl
xor eax, eax
or cl, byte [esp + 3]
jne 0x4c9d60
xor eax, eax
nop word [eax + eax]
movups xmm0, xmmword [esp + eax + 0x18]
movups xmm2, xmmword [ebx + eax]
movups xmm1, xmmword [esp + eax + 0x28]
movups xmm3, xmmword [ebx + eax + 0x10]
xorps xmm2, xmm0
xorps xmm3, xmm1
movups xmmword [ebx + eax], xmm2
movups xmmword [ebx + eax + 0x10], xmm3
add eax, 0x20
cmp ebp, eax
jne 0x4c9d30
cmp esi, ebp
mov eax, ebp
je 0x4c9d6d
nop
movzx ecx, byte [esp + eax + 0x18]
xor byte [ebx + eax], cl
inc eax
cmp eax, esi
jb 0x4c9d60
mov eax, dword [esp + 0x14]
inc eax
cmp eax, dword [esp + 0xb0]
jb 0x4c9cc0
nop
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
add ebx, esi
lea ebp, [esp + 0x58]
inc ecx
sub eax, esi
jne 0x4c9bdc
xor ebx, ebx
cmp dword [esp + 0xb0], 0
setne bl
jmp 0x4c9daa
mov ebp, edi
xor ebx, ebx
push ebp
call sym.adb.exe_HMAC_CTX_cleanup
add esp, 4
mov eax, ebx
add esp, 0x8c
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4c9fc0
Capabilities:
Print debug messages

Disassembly:
push ebx
push edi
push esi
push eax
mov ebx, dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x1c]
mov dword [esp], eax
push eax
push ebx
call dword [sym.imp.msvcrt.dll__vscprintf]
add esp, 8
inc eax
push eax
call sub.msvcrt.dll_malloc
add esp, 4
test eax, eax
je 0x4ca00f
mov edi, eax
push dword [esp]
push ebx
push eax
call fcn.0052c630
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
call fcn.00537860
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
add esp, 4
pop esi
pop edi
pop ebx
ret
Function at 0x4ca360
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov ebx, dword [esp + 0x34]
test ebx, ebx
je 0x4ca3dc
mov ebp, edx
mov esi, ecx
nop word cs:[eax + eax]
nop dword [eax]
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], esi
mov dword [esp + 0xc], 0
call dword [sym.imp.WS2_32.dll_recv]
sub esp, 0x10
mov edi, eax
test eax, eax
js 0x4ca3c0
xor ecx, ecx
test edi, edi
je 0x4ca3e8
mov eax, ebx
sub eax, edi
jl 0x4ca3e8
add ebp, edi
mov ebx, eax
test ebx, ebx
jne 0x4ca380
jmp 0x4ca3dc
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x4ca3e6
mov dword [esp + 4], str.dnssd_clientstub_read_all:_EINTR_continue
call fcn.004c9fc0
test ebx, ebx
jne 0x4ca380
xor eax, eax
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov cl, 1
mov ebp, ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4ca443
mov eax, ebp
test al, al
je 0x4ca41b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x1c], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp], eax
call fcn.004cd010
mov ecx, dword [esp + 0x1c]
jmp 0x4ca422
mov eax, 0x5ae78d
xor ecx, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], str.dnssd_clientstub_read_all__d__failed__ld__ld__d__s
call fcn.004c9fc0
mov ecx, ebp
mov eax, 0xffffffff
test cl, cl
je 0x4ca3de
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
cmp eax, 0x2733
sete cl
not ecx
mov eax, ecx
jmp 0x4ca3de
Function at 0x4cd290
Capabilities:
Enumerate services

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov dword [esp + 4], 0
mov dword [esp + 8], 0
push 4
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test eax, eax
je 0x4cd328
mov ebp, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
xor ebx, ebx
xor edi, edi
nop word cs:[eax + eax]
nop dword [eax]
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0xc]
push eax
push ebx
push edi
push 3
push 0x30
push esi
call ebp
test eax, eax
jne 0x4cd35f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4cd34b
test edi, edi
je 0x4cd306
push edi
call fcn.00537860
add esp, 4
mov ebx, dword [esp + 4]
push ebx
call sub.msvcrt.dll_malloc
add esp, 4
mov edi, eax
test eax, eax
jne 0x4cd2d0
xor ebx, ebx
test esi, esi
jne 0x4cd3bf
jmp 0x4cd3c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
test eax, eax
je 0x4cd3c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4cd3c6
jmp 0x4cd2b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4cd393
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4cd393
mov ebx, dword [esp + 0xc]
test ebx, ebx
je 0x4cd393
mov dword [esp], esi
xor esi, esi
mov ebp, edi
nop
push str.Bonjour_Service
push dword [ebp]
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x4cd39b
inc esi
add ebp, 0x24
cmp esi, ebx
jb 0x4cd370
mov esi, dword [esp]
xor ebx, ebx
jmp 0x4cd3b2
xor ebx, ebx
test edi, edi
jne 0x4cd3b2
jmp 0x4cd3bb
mov eax, dword [ebp + 0xc]
mov esi, dword [esp]
cmp eax, 7
je 0x4cd3ad
xor ebx, ebx
cmp eax, 1
jne 0x4cd3b2
mov ebx, 1
push edi
call fcn.00537860
add esp, 4
test esi, esi
je 0x4cd3c6
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4cee70
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x408
mov eax, dword [esp + 0x41c]
test eax, eax
jne 0x4cee8a
mov eax, dword [0x5d9ddc]
test eax, eax
je 0x4cee99
mov esi, dword [eax]
test esi, esi
jne 0x4ceec1
jmp case.0x4cef83.0
push str.LIBUSB_DEBUG
call sub.msvcrt.dll_getenv
add esp, 4
test eax, eax
je case.0x4cef83.0
push eax
call sub.msvcrt.dll_atoi
add esp, 4
mov esi, eax
test esi, esi
je case.0x4cef83.0
mov edi, dword [esp + 0x420]
cmp edi, 2
jne 0x4ceed6
cmp esi, 2
jl case.0x4cef83.0
cmp edi, 3
jne 0x4ceee4
cmp esi, 3
jl case.0x4cef83.0
cmp edi, 4
jne 0x4ceef2
cmp esi, 4
jl case.0x4cef83.0
mov eax, esp
push 0
push eax
call fcn.00523430
add esp, 8
cmp byte [0x5d9df8], 0
jne 0x4cef4c
cmp esi, 4
jne 0x4cef4c
mov ebx, dword [fcn.005379b0]
mov byte [0x5d9df8], 1
push 2
call ebx
add esp, 4
push eax
push 1
push 0x40
push str._timestamp___threadID__facility_level__function_call___message__n
call sub.msvcrt.dll_fwrite
add esp, 0x10
push 2
call ebx
add esp, 4
push eax
push 1
push 0x51
push str._________________________________________________________________________________n
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov ebp, dword [esp + 4]
mov eax, dword [0x5d9df0]
mov ebx, dword [esp]
cmp ebp, eax
jge 0x4cef6a
dec ebx
add ebp, 0xf4240
mov dword [esp], ebx
mov dword [esp + 4], ebp
sub ebx, dword [0x5d9dec]
sub ebp, eax
cmp edi, 4
mov dword [esp], ebx
mov dword [esp + 4], ebp
ja case.default.0x4cef83
mov eax, str.info
jmp dword [edi*4 + 0x5af234]
mov eax, str.error
jmp case.0x4cef83.3
mov eax, str.unknown
jmp case.0x4cef83.3
mov eax, str.warning
jmp case.0x4cef83.3
mov eax, str.debug
mov edi, dword [esp + 0x424]
cmp esi, 4
jne 0x4cefe7
mov esi, eax
call sub.KERNEL32.dll_GetCurrentThreadId
sub esp, 0x20
mov dword [esp + 0x14], eax
lea eax, [esp + 0x28]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.__2d._06d____08x__libusb:__s___s_
mov dword [esp], eax
call fcn.004cf090
add esp, 0x20
jmp 0x4cf009
sub esp, 0x14
mov dword [esp + 0xc], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x10], edi
mov dword [esp + 8], str.libusb:__s___s_
mov dword [esp], eax
call fcn.004cf090
add esp, 0x14
xor edi, edi
mov esi, eax
cmp eax, 0x3ff
mov ebp, 0x400
cmova esi, edi
lea ebx, [esp + esi + 8]
mov byte [esp + esi + 8], 0
sub ebp, esi
push dword [esp + 0x42c]
push dword [esp + 0x42c]
push ebp
push ebx
call fcn.0052c540
add esp, 0x10
lea ecx, [eax + esi]
cmp ecx, 0x3ff
mov ecx, eax
cmovg ecx, ebp
test eax, eax
cmovs ecx, ebp
lea eax, [ecx + esi + 2]
cmp eax, 0x3ff
lea eax, [ecx + esi - 0x3fe]
cmovbe eax, edi
sub ecx, eax
mov word [ebx + ecx], 0xa
push 2
call dword [0x58040c]
add esp, 4
lea ecx, [esp + 8]
push eax
push ecx
call sub.msvcrt.dll_fputs
add esp, 8
add esp, 0x408
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4d7d20
Capabilities:
Check if file exists

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ebx, dword [edi + 0x10]
cmp eax, 0xffffffff
mov ecx, dword [ebx + 8]
jne 0x4d7d3b
mov eax, dword [ebx + 0x50]
imul eax, eax, 0x58
cmp dword [eax + 0x5d9e90], 0
je 0x4d7d99
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
add ebx, 0x54
xor ebp, ebp
mov dword [esp], ecx
nop word cs:[eax + eax]
nop
mov eax, dword [ebx]
test eax, eax
je 0x4d7d8c
mov ecx, dword [ebx + 4]
cmp byte [ecx], 3
jne 0x4d7d8c
push 0
push 0x40000080
push 3
push 0
push 3
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
je 0x4d7da0
mov dword [edi + ebp*8 + 0x1c], eax
inc ebp
add ebx, 0x18
cmp ebp, 0x20
jb 0x4d7d60
xor eax, eax
jmp 0x4d7de6
mov eax, 0xfffffffd
jmp 0x4d7de6
mov esi, dword [ebx]
push 0
call fcn.004db2c0
add esp, 4
push eax
push ebp
push esi
push str.could_not_open_device__s__interface__d_:__s
push str.winusbx_open
push 1
push dword [esp + 0x18]
call fcn.004cd4b0
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
setne cl
add cl, cl
movzx ecx, cl
or ecx, 0xfffffffd
cmp eax, 2
mov eax, 0xfffffffc
cmovne eax, ecx
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret