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

Disassembly:
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
xor dl, dl
push edi
mov edi, dword [esp + 0x10]
test esi, esi
je 0x44d2e3
sub edi, eax
mov cl, byte [edi + eax]
xor cl, byte [eax]
lea eax, [eax + 1]
or dl, cl
dec esi
jne 0x44d2d6
pop edi
movzx eax, dl
pop esi
ret

Function at 0x44d460
Capabilities:
Access the windows event log
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x208
call fcn.00554690
mov eax, dword [0x5cab48]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
test esi, esi
je 0x44d4d5
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
je 0x44d4d5
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x204]
push 0x200
push eax
call sub.MSVCR110.dll__vsnprintf
add esp, 0x10
lea ecx, [ebp - 0x208]
push 0
push ecx
test eax, eax
mov ecx, 0x200
cmovs eax, ecx
push eax
lea eax, [ebp - 0x204]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x44d622
mov ebx, dword [ebp + 8]
mov ecx, ebx
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x44d4e0
sub ecx, edx
lea edi, [ecx + 1]
lea eax, [edi + edi]
call fcn.00554d20
mov esi, esp
test esi, esi
jne 0x44d504
mov esi, str.no_stack_
jmp 0x44d593
push edi
push esi
push edi
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x44d533
xor ecx, ecx
test edi, edi
je 0x44d533
lea esp, [esp]
mov eax, dword [ebp + 8]
inc ecx
movsx ax, byte [ecx + eax - 1]
mov word [esi + ecx*2 - 2], ax
cmp ecx, edi
jb 0x44d520
xor ecx, ecx
test edi, edi
je 0x44d593
lea ebx, [ecx + 0x53]
lea esp, [esp]
cmp word [esi + ecx*2], 0x25
jne case.0x44d562.43
lea edx, [ecx + 1]
lea edx, [esi + edx*2]
lea ecx, [ecx]
movzx eax, word [edx]
add eax, 0xffffffd6
cmp eax, 0x49
ja case.0x44d562.43
movzx eax, byte [eax + 0x44d654]
jmp dword [eax*4 + 0x44d63c]
inc ecx
add edx, 2
jmp 0x44d550
mov word [esi + ecx*2 + 2], bx
jmp case.0x44d562.43
mov eax, 0x73
jmp 0x44d589
mov eax, 0x43
jmp 0x44d589
mov eax, 0x63
mov word [esi + ecx*2 + 2], ax
inc ecx
cmp ecx, edi
jb 0x44d540
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp - 0x204]
push 0xff
push eax
call sub.MSVCR110.dll__vsnwprintf
xor eax, eax
add esp, 0x10
mov word [ebp - 6], ax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x44d60c
call fcn.0044d320
test eax, eax
jle 0x44d60c
push str.OpenSSL
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x44d622
push 0
lea eax, [ebp - 0x204]
mov dword [ebp - 0x208], eax
lea eax, [ebp - 0x208]
push eax
push 0
push 1
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x44d622
push 0x10
push str.OpenSSL:_FATAL
lea eax, [ebp - 0x204]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea esp, [ebp - 0x214]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055423a
mov esp, ebp
pop ebp
ret
Function at 0x4681c0
Capabilities:
Encode data using base64

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
xor ebx, ebx
test esi, esi
jle 0x4682ac
push edi
mov edi, dword [esp + 0x14]
inc edi
lea ebx, [ebx]
movzx edx, byte [edi - 1]
cmp esi, 3
jl 0x46823e
movzx ecx, byte [edi]
shl edx, 8
or edx, ecx
movzx ecx, byte [edi + 1]
shl edx, 8
or edx, ecx
mov ecx, edx
shr ecx, 0x12
and ecx, 0x3f
movzx ecx, byte [ecx + 0x57a6f8]
mov byte [eax], cl
mov ecx, edx
shr ecx, 0xc
and ecx, 0x3f
movzx ecx, byte [ecx + 0x57a6f8]
mov byte [eax + 1], cl
mov ecx, edx
shr ecx, 6
and ecx, 0x3f
and edx, 0x3f
movzx ecx, byte [ecx + 0x57a6f8]
mov byte [eax + 2], cl
movzx ecx, byte [edx + 0x57a6f8]
mov byte [eax + 3], cl
jmp 0x46828f
shl edx, 0x10
cmp esi, 2
jne 0x46824e
movzx ecx, byte [edi]
shl ecx, 8
or edx, ecx
mov ecx, edx
shr ecx, 0x12
and ecx, 0x3f
movzx ecx, byte [ecx + 0x57a6f8]
mov byte [eax], cl
mov ecx, edx
shr ecx, 0xc
and ecx, 0x3f
movzx ecx, byte [ecx + 0x57a6f8]
mov byte [eax + 1], cl
cmp esi, 1
jne 0x46827b
lea ecx, [esi + 0x3c]
jmp 0x468288
shr edx, 6
and edx, 0x3f
movzx ecx, byte [edx + 0x57a6f8]
mov byte [eax + 2], cl
mov byte [eax + 3], 0x3d
sub esi, 3
add eax, 4
add ebx, 4
add edi, 3
test esi, esi
jg 0x4681e0
pop edi
mov byte [eax], 0
pop esi
mov eax, ebx
pop ebx
ret
mov byte [eax], bl
pop esi
mov eax, ebx
pop ebx
ret
Function at 0x477130
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edx, dword [esp + 4]
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov ecx, ebx
push edi
mov esi, ebp
sub ecx, 4
jb 0x477161
lea esp, [esp]
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x477168
add edx, 4
add esi, 4
sub ecx, 4
jae 0x477150
xor edi, edi
cmp ecx, 0xfffffffc
je 0x4771a3
movzx edi, byte [edx]
movzx eax, byte [esi]
sub edi, eax
jne 0x4771a3
cmp ecx, 0xfffffffd
je 0x4771a3
movzx edi, byte [edx + 1]
movzx eax, byte [esi + 1]
sub edi, eax
jne 0x4771a3
cmp ecx, 0xfffffffe
je 0x4771a3
movzx edi, byte [edx + 2]
movzx eax, byte [esi + 2]
sub edi, eax
jne 0x4771a3
cmp ecx, 0xffffffff
je 0x4771a3
movzx edi, byte [edx + 3]
movzx eax, byte [esi + 3]
sub edi, eax
test edi, edi
jle 0x4771be
push 0x157
push str.....openssl_1.1.0ecryptox509v3_v3_addr.c
push str.assertion_failed:_memcmp_min__max__length____0
call fcn.0044d2f0
add esp, 0xc
mov edi, dword [esp + 0x14]
xor ecx, ecx
test ebx, ebx
jle 0x4771dd
mov esi, edi
mov edx, ebp
sub esi, ebp
mov edi, edi
mov al, byte [esi + edx]
cmp al, byte [edx]
jne 0x4771dd
inc ecx
inc edx
cmp ecx, ebx
jl 0x4771d0
lea edx, [ebx - 1]
test edx, edx
js 0x4771ff
mov esi, edi
lea eax, [edx + ebp]
sub esi, ebp
jmp 0x4771f0
cmp byte [eax + esi], 0
jne 0x4771ff
cmp byte [eax], 0xff
jne 0x4771ff
dec eax
dec edx
jns 0x4771f0
cmp ecx, edx
jl case.0x47722b.2
jle 0x477211
pop edi
pop esi
pop ebp
lea eax, [ecx*8]
pop ebx
ret
mov bl, byte [ecx + ebp]
mov dh, byte [ecx + edi]
mov dl, bl
xor dl, dh
movzx eax, dl
dec eax
cmp eax, 0x7e
ja case.0x47722b.2
movzx eax, byte [eax + 0x47729c]
jmp dword [eax*4 + 0x47727c]
mov eax, 7
jmp 0x477261
mov eax, 6
jmp 0x477261
mov eax, 5
jmp 0x477261
mov eax, 4
jmp 0x477261
mov eax, 3
jmp 0x477261
mov eax, 2
jmp 0x477261
mov eax, 1
test dl, dh
jne case.0x47722b.2
and bl, dl
cmp bl, dl
jne case.0x47722b.2
pop edi
pop esi
pop ebp
lea eax, [eax + ecx*8]
pop ebx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
Function at 0x491d80
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x24
call fcn.00554690
push ebx
push esi
mov esi, dword [esp + 0x40]
push edi
push dword [esp + 0x38]
mov edi, dword [esp + 0x40]
push dword [esp + 0x38]
mov ecx, esi
mov ebx, 1
shl ebx, cl
call fcn.0043bfd0
add esp, 8
test eax, eax
jne 0x491db9
pop edi
pop esi
pop ebx
add esp, 0x24
ret
push ebp
cmp esi, 3
jg 0x491e1c
xor ebp, ebp
cmp dword [esp + 0x3c], ebp
jle 0x491f6e
jmp 0x491dd0
xor esi, esi
xor eax, eax
test ebx, ebx
jle 0x491dfd
mov ecx, eax
xor ecx, dword [esp + 0x44]
inc eax
lea edx, [ecx - 1]
shr edx, 0x1f
not ecx
shr ecx, 0x1f
and edx, ecx
neg edx
and edx, 1
neg edx
and edx, dword [edi + eax*4 - 4]
or esi, edx
cmp eax, ebx
jl 0x491dd8
mov eax, dword [esp + 0x38]
inc ebp
mov eax, dword [eax]
mov dword [eax + ebp*4 - 4], esi
lea eax, [ebx*4]
add edi, eax
cmp ebp, dword [esp + 0x3c]
jl 0x491dd0
jmp 0x491f6e
mov ebp, dword [esp + 0x44]
lea ecx, [esi - 2]
mov esi, 1
shl esi, cl
mov edx, ebp
sar edx, cl
mov dword [esp + 0x2c], esi
lea eax, [esi - 1]
and ebp, eax
mov eax, edx
not eax
shr eax, 0x1f
lea ecx, [edx - 1]
shr ecx, 0x1f
and ecx, eax
neg ecx
and ecx, 1
neg ecx
mov dword [esp + 0x28], ecx
mov eax, edx
xor eax, 1
mov dword [esp + 0x18], ebp
lea ecx, [eax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
neg ecx
and ecx, 1
neg ecx
mov eax, edx
xor eax, 2
mov dword [esp + 0x24], ecx
lea ecx, [eax - 1]
not eax
shr eax, 0x1f
shr ecx, 0x1f
and ecx, eax
xor edx, 3
neg ecx
lea eax, [edx - 1]
shr eax, 0x1f
not edx
shr edx, 0x1f
and eax, edx
and ecx, 1
neg ecx
neg eax
and eax, 1
mov dword [esp + 0x20], ecx
xor ecx, ecx
neg eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
cmp dword [esp + 0x3c], ecx
jle 0x491f6e
shl ebx, 2
mov dword [esp + 0x30], ebx
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x48], edx
test esi, esi
jle 0x491f51
lea eax, [esi + esi*2]
lea ecx, [edi + esi*8]
lea eax, [edi + eax*4]
lea ebp, [edi + esi*4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x40], eax
mov eax, dword [eax]
mov ecx, dword [ecx]
and ecx, dword [esp + 0x20]
and eax, dword [esp + 0x1c]
mov edx, dword [ebp]
and edx, dword [esp + 0x24]
or ecx, eax
mov eax, dword [edi + ebx*4]
and eax, dword [esp + 0x28]
or edx, ecx
mov esi, ebx
xor esi, dword [esp + 0x18]
or eax, edx
mov edx, dword [esp + 0x48]
lea ecx, [esi - 1]
shr ecx, 0x1f
not esi
shr esi, 0x1f
and ecx, esi
mov esi, dword [esp + 0x2c]
neg ecx
and ecx, 1
neg ecx
and ecx, eax
mov eax, dword [esp + 0x40]
or edx, ecx
mov ecx, dword [esp + 0x10]
inc ebx
add eax, 4
add ecx, 4
mov dword [esp + 0x48], edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x10], ecx
lea ebp, [ebp + 4]
cmp ebx, esi
jl 0x491ee5
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
add edi, dword [esp + 0x30]
mov eax, dword [eax]
inc ecx
mov dword [eax + ecx*4 - 4], edx
mov dword [esp + 0x14], ecx
cmp ecx, dword [esp + 0x3c]
jl 0x491ec1
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
push eax
mov dword [eax + 4], edi
call fcn.0043bdd0
add esp, 4
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x24
ret
Function at 0x4933c0
Capabilities:
Check if file exists

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push esi
push dword [esp + 0x14]
call fcn.004b0770
push 0x62
push esi
mov edi, eax
mov ebx, 1
call sub.MSVCR110.dll_strchr
add esp, 0x10
test eax, eax
mov ecx, 0x11
cmove ebx, ecx
test edi, edi
jne 0x493477
push 0x4a
push str.....openssl_1.1.0ecrypto_bio_bss_file.c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
push 2
call fcn.0044c3d0
push 0x585f8c
push esi
push 0x585f90
push dword [esp + 0x30]
push str.fopen_
push 5
call fcn.0044bbd0
add esp, 0x2c
call sub.MSVCR110.dll__errno
cmp dword [eax], 2
je 0x493459
call sub.MSVCR110.dll__errno
cmp dword [eax], 6
je 0x493459
push 0x53
push str.....openssl_1.1.0ecrypto_bio_bss_file.c
push 2
push 0x6d
push 0x20
call fcn.0044c3d0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
ret
push 0x51
push str.....openssl_1.1.0ecrypto_bio_bss_file.c
push 0x80
push 0x6d
push 0x20
call fcn.0044c3d0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
ret
push 0x585f28
call fcn.0043a530
mov esi, eax
add esp, 4
test esi, esi
jne 0x493499
push edi
call sub.MSVCR110.dll_fclose
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
ret
push 0
push esi
call fcn.0043a130
push edi
push ebx
push 0x6a
push esi
call fcn.0043a160
add esp, 0x18
mov eax, esi
pop edi
pop esi
pop ebx
ret
Function at 0x497f00
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov eax, 0x8c
call fcn.00554690
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x88], eax
mov edx, dword [esp + 0xa0]
push ebx
mov ebx, dword [esp + 0x9c]
push ebp
mov ebp, dword [esp + 0x9c]
push esi
mov esi, dword [esp + 0x9c]
push edi
mov edi, dword [esp + 0xac]
xor eax, eax
mov dword [esp + 0x10], edx
test edi, edi
je 0x497f66
cmp edi, dword [esi]
je 0x497f5d
test ebp, ebp
je 0x497fe0
test ebx, ebx
js 0x497fe0
mov eax, 1
mov dword [esi], edi
jmp 0x497f6c
mov edi, dword [esi]
test edi, edi
je 0x497fe0
test ebp, ebp
je 0x4980fa
push edi
call fcn.0044db60
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, 0x80
jle 0x497fa0
push 0x28
push str.....openssl_1.1.0ecryptohmachmac.c
push str.assertion_failed:_j____int_sizeof_ctx__key_
call fcn.0044d2f0
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp eax, ebx
jge 0x497ffb
push dword [esp + 0x10]
push edi
push dword [esi + 4]
call fcn.0043c180
add esp, 0xc
test eax, eax
je 0x497fe0
push ebx
push ebp
push dword [esi + 4]
call fcn.0043c330
add esp, 0xc
test eax, eax
je 0x497fe0
lea ebp, [esi + 0x10]
push ebp
lea eax, [esi + 0x14]
push eax
push dword [esi + 4]
call fcn.0043c0e0
add esp, 0xc
test eax, eax
jne 0x498017
xor eax, eax
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0055423a
add esp, 0x8c
ret
cmp ebx, 0x80
ja 0x497fe0
push ebx
lea eax, [esi + 0x14]
push ebp
push eax
call sub.MSVCR110.dll_memcpy
lea ebp, [esi + 0x10]
add esp, 0xc
mov dword [ebp], ebx
mov ecx, dword [ebp]
cmp ecx, 0x80
je 0x49803a
mov eax, 0x80
sub eax, ecx
push eax
lea eax, [esi + 0x14]
add eax, ecx
push 0
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov al, byte [esi + ecx + 0x14]
xor al, 0x36
mov byte [esp + ecx + 0x18], al
inc ecx
cmp ecx, 0x80
jl 0x498040
push edx
push edi
push dword [esi + 8]
call fcn.0043c180
add esp, 0xc
test eax, eax
je 0x497fe0
push edi
call fcn.0044db60
push eax
lea eax, [esp + 0x20]
push eax
push dword [esi + 8]
call fcn.0043c330
add esp, 0x10
test eax, eax
je 0x497fe0
xor ecx, ecx
lea esp, [esp]
mov al, byte [esi + ecx + 0x14]
xor al, 0x5c
mov byte [esp + ecx + 0x18], al
inc ecx
cmp ecx, 0x80
jl 0x498090
push dword [esp + 0x10]
push edi
push dword [esi + 0xc]
call fcn.0043c180
add esp, 0xc
test eax, eax
je 0x497fe0
push edi
call fcn.0044db60
push eax
lea eax, [esp + 0x20]
push eax
push dword [esi + 0xc]
call fcn.0043c330
add esp, 0x10
test eax, eax
je 0x497fe0
push dword [esi + 8]
push dword [esi + 4]
call fcn.0043c360
add esp, 8
test eax, eax
je 0x497fe0
mov eax, 1
jmp 0x497fe2
test eax, eax
je 0x4980da
jmp 0x49803e
Function at 0x4986a0
Capabilities:
Generate random numbers via winapi
Get memory capacity

Disassembly:
mov eax, 0x6c
call fcn.00554690
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x68], eax
push 0xf0000040
push 1
push 0
push 0
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x498716
lea eax, [esp + 0x28]
push eax
push 0x40
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x49870a
mov eax, 8
call fcn.00554690
movsd xmm0, qword [0x5870c8]
movsd qword [esp], xmm0
lea eax, [esp + 0x30]
push 0x40
push eax
call fcn.004409c0
add esp, 0x10
push 0
push dword [esp + 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0xf0000040
push 0x16
push str.Intel_Hardware_Cryptographic_Service_Provider
push 0
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x49877a
lea eax, [esp + 0x28]
push eax
push 0x40
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x49876e
mov eax, 8
call fcn.00554690
movsd xmm0, qword [0x5870c8]
movsd qword [esp], xmm0
lea eax, [esp + 0x30]
push 0x40
push eax
call fcn.004409c0
add esp, 0x10
push 0
push dword [esp + 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call fcn.00498800
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
mov eax, 8
call fcn.00554690
movsd xmm0, qword [0x5605c8]
movsd qword [esp], xmm0
lea eax, [esp + 0x10]
push 0x20
push eax
call fcn.004409c0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esp + 4], eax
mov eax, 8
call fcn.00554690
movsd xmm0, qword [0x5605c8]
movsd qword [esp], xmm0
lea eax, [esp + 0xc]
push 4
push eax
call fcn.004409c0
mov ecx, dword [esp + 0x78]
add esp, 0x10
xor ecx, esp
mov eax, 1
call fcn.0055423a
add esp, 0x6c
ret
Function at 0x50d4e0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
lea edi, [esi + eax]
mov ebx, 0x1505
cmp esi, edi
jae 0x50d515
mov al, byte [esi]
push eax
call fcn.0051bd20
movsx ecx, al
mov eax, ebx
shl eax, 5
add eax, ebx
xor ecx, eax
inc esi
add esp, 4
mov ebx, ecx
cmp esi, edi
jb 0x50d4f7
pop edi
pop esi
movzx eax, bl
pop ebx
ret

Function at 0x50e920
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x2d0], 2
je fcn.0050e8d0
mov eax, 1
ret
Function at 0x517bb0
Capabilities:
Write file on windows

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
cmp dword [edi + 0x610], 0
je 0x517bf4
push 1
push edi
call fcn.00509700
push dword [edi + 0x5a4]
mov eax, dword [edi + 0x610]
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push edi
call eax
push 0
push edi
mov esi, eax
call fcn.00509700
add esp, 0x24
mov eax, esi
pop edi
pop esi
ret
mov eax, dword [esp + 0x10]
cmp eax, 2
ja 0x517c2d
push dword [edi + 0x5a0]
mov esi, dword [sym.imp.MSVCR110.dll_fwrite]
push 1
lea eax, [eax + eax*2]
add eax, 0x5af500
push 2
push eax
call esi
push dword [edi + 0x5a0]
push 1
push dword [esp + 0x30]
push dword [esp + 0x30]
call esi
add esp, 0x20
pop edi
xor eax, eax
pop esi
ret

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

Disassembly:
sub esp, 0x84
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x8c]
push ebx
mov ebx, dword [esp + 0x9c]
push ebp
mov ebp, dword [esp + 0x90]
push esi
mov esi, dword [ebp + eax*4 + 0x1b8]
push edi
mov edi, dword [esp + 0xa0]
push eax
push ebp
call fcn.00518570
add esp, 8
push 0
push dword [esp + 0xa8]
push edi
push esi
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
mov dword [ebx], 0
cmp esi, 0xffffffff
jne 0x51807f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0x2733
jne 0x51804d
mov dword [ebx], 0x51
xor eax, eax
jmp 0x51807f
push 0x80
lea eax, [esp + 0x14]
push eax
push edi
call fcn.00504ec0
push eax
push str.Send_failure:__s
push dword [ebp]
call fcn.00517c40
mov eax, dword [ebp]
add esp, 0x18
mov dword [eax + 0xcbc], edi
mov dword [ebx], 0x37
mov eax, esi
mov ecx, dword [esp + 0x90]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0055423a
add esp, 0x84
ret

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

Disassembly:
mov ecx, dword [esp + 8]
push ebx
mov ebx, dword [esp + 8]
push ebp
mov eax, dword [ebx + 0x2c8]
mov ebp, dword [ebx + ecx*4 + 0x1b8]
push esi
lea esi, [ecx + 0x1e]
shl esi, 4
add esi, ebx
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x40], 3
je 0x518623
cmp dword [ebx + ecx*4 + 0x1d0], 0x517ef0
jne 0x518623
cmp dword [esi], 0
je 0x5185b7
test edi, edi
je 0x518623
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.00517740
add esp, 0x14
cmp eax, 0xffffffff
je 0x518623
test al, 1
je 0x518623
cmp dword [esi], 0
jne 0x51860c
mov eax, dword [ebx]
mov eax, dword [eax + 0x8f4]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x5ca750]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test eax, eax
jne 0x51860c
pop edi
mov dword [esi + 4], eax
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x518623
add dword [esi + 8], eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x5192a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x188
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x184], eax
push ebx
mov ebx, dword [esp + 0x190]
cmp dword [ebx + 0x90], 2
je 0x519462
mov eax, dword [ebx + 0x2a4]
push ebp
push esi
push edi
test al, 2
jne 0x519456
test eax, 0x8000000
jne 0x519456
mov esi, dword [esp + 0x1a0]
mov ebp, dword [ebx]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x98]
push eax
push esi
mov dword [esp + 0x1c], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x51933e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push 0x80
lea eax, [esp + 0x118]
push eax
push esi
call fcn.00504ec0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebp
call fcn.00517c40
add esp, 0x1c
jmp 0x51945f
push 0x80
lea eax, [esp + 0x18]
push 0
push eax
mov dword [esp + 0x1c], 0x80
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x51939f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push 0x80
lea eax, [esp + 0x118]
push eax
push esi
call fcn.00504ec0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebp
call fcn.00517c40
add esp, 0x1c
jmp 0x51945f
lea eax, [ebx + 0x138]
push eax
lea esi, [ebx + 0x10a]
lea eax, [esp + 0x98]
push esi
push eax
call fcn.00519980
add esp, 0xc
test eax, eax
jne 0x5193f6
mov esi, dword [sym.imp.MSVCR110.dll__errno]
call esi
mov edi, eax
call esi
mov esi, eax
push 0x80
lea eax, [esp + 0x118]
push eax
push dword [edi]
call fcn.00504ec0
push eax
push dword [esi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00517c40
add esp, 0x1c
jmp 0x51945f
lea edi, [ebx + 0x5c]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x16c]
push eax
lea eax, [ebx + 0x13c]
push eax
lea eax, [esp + 0x1c]
push eax
movsw word es:[edi], word [esi]
call fcn.00519980
add esp, 0xc
test eax, eax
jne 0x519456
mov esi, dword [sym.imp.MSVCR110.dll__errno]
call esi
mov edi, eax
call esi
mov esi, eax
push 0x80
lea eax, [esp + 0x118]
push eax
push dword [edi]
call fcn.00504ec0
push eax
push dword [esi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00517c40
add esp, 0x1c
jmp 0x51945f
push ebx
call fcn.00518f20
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x188]
pop ebx
xor ecx, esp
call fcn.0055423a
add esp, 0x188
ret
Function at 0x519d40
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x18
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x14], eax
push esi
mov esi, dword [esp + 0x20]
push edi
mov eax, dword [esi + 0xaa0]
mov edi, dword [esp + 0x28]
shr eax, 0xc
and eax, 1
push 4
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x519da1
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00517d30
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0055423a
add esp, 0x18
ret
push dword [esi + 0xa60]
mov dword [esp + 0x14], 1
call fcn.0051a060
imul eax, eax, 0x3e8
push dword [esi + 0xa64]
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
call fcn.0051a060
imul eax, eax, 0x3e8
add esp, 8
mov dword [esp + 8], eax
push 0
push 0
mov dword [esp + 0x20], eax
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0x28]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x519e18
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.00517d30
add esp, 0x10
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
xor ecx, esp
call fcn.0055423a
add esp, 0x18
ret

Function at 0x519e30
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x88
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x8c]
push esi
mov esi, dword [eax]
push 4
lea eax, [esp + 8]
push eax
push 1
push 6
push dword [esp + 0xa4]
mov dword [esp + 0x18], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x519ead
push 0x80
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00504ec0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00517d30
add esp, 0x18
pop esi
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.0055423a
add esp, 0x88
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.00517d30
mov ecx, dword [esp + 0x90]
add esp, 8
pop esi
xor ecx, esp
call fcn.0055423a
add esp, 0x88
ret