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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x899944]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
mov ecx, 0x20
mov esi, ebx
lea edi, [ebp - 0x84]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov edx, 0x7bc1d8
mov eax, ebx
sub edx, ebx
lea esi, [ecx + 0x1f]
mov edi, dword [edx + eax]
add edi, dword [eax]
add eax, 4
add ecx, edi
movzx edi, cl
mov dword [eax - 4], edi
shr ecx, 8
dec esi
jne 0x509cc5
sub ecx, 0xffffff80
add dword [ebx + 0x7c], ecx
mov edx, dword [ebx + 0x7c]
shr edx, 7
and edx, 1
lea edi, [ebp - 0x84]
lea esi, [ebp - 0x80]
neg edx
xor ecx, ecx
sub edi, ebx
sub esi, ebx
lea eax, [ebx + 8]
mov dword [ebp - 0x88], esi
mov esi, dword [eax - 8]
mov ebx, dword [ebp + ecx*4 - 0x84]
xor ebx, esi
and ebx, edx
xor ebx, esi
mov esi, dword [eax - 4]
mov dword [eax - 8], ebx
mov ebx, dword [ebp + ecx*4 - 0x80]
xor ebx, esi
and ebx, edx
xor ebx, esi
mov esi, dword [eax]
mov dword [eax - 4], ebx
mov ebx, dword [edi + eax]
xor ebx, esi
and ebx, edx
xor ebx, esi
mov esi, dword [eax + 4]
mov dword [eax], ebx
mov ebx, dword [ebp - 0x88]
mov ebx, dword [ebx + eax]
xor ebx, esi
and ebx, edx
xor ebx, esi
mov dword [eax + 4], ebx
add ecx, 4
add eax, 0x10
cmp ecx, 0x20
jb 0x509d04
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret

Function at 0x50a9d0
Capabilities:
Encrypt data using curve25519

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x899944]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
push 0x20
mov edi, ecx
push eax
lea ecx, [ebp - 0x24]
push ecx
call fcn.0070d6a0
mov dl, byte [ebp - 5]
and byte [ebp - 0x24], 0xf8
and dl, 0x3f
or dl, 0x40
add esp, 0xc
mov byte [ebp - 5], dl
xor eax, eax
lea ebx, [ebx]
movzx ecx, byte [eax + edi]
mov dword [ebp + eax*4 - 0x1a4], ecx
inc eax
cmp eax, 0x20
jb 0x50aa10
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp - 0x1a4]
call fcn.0050a0d0
lea ecx, [ebp - 0x124]
mov edi, ecx
call fcn.0050a590
mov eax, edi
push eax
lea ecx, [ebp - 0xa4]
push ecx
lea edx, [ebp - 0x1a4]
call fcn.00509d70
add esp, 0xc
lea ecx, [ebp - 0xa4]
call fcn.00509c90
xor eax, eax
pop edi
mov dl, byte [ebp + eax*4 - 0xa4]
mov byte [esi + eax], dl
inc eax
cmp eax, 0x20
jb 0x50aa63
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret
Function at 0x50ab20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edx + 0x7c]
mov ecx, esi
xor ecx, 0x7f
dec ecx
push ebx
shr ecx, 0x1f
lea eax, [edx + 0x74]
mov dword [ebp - 4], 5
push edi
lea ecx, [ecx]
mov edi, dword [eax - 0x10]
mov ebx, dword [eax - 0xc]
xor ebx, 0xff
dec ebx
shr ebx, 0x1f
xor edi, 0xff
dec edi
shr edi, 0x1f
and edi, ebx
mov ebx, dword [eax - 8]
xor ebx, 0xff
dec ebx
shr ebx, 0x1f
and edi, ebx
mov ebx, dword [eax - 4]
xor ebx, 0xff
dec ebx
shr ebx, 0x1f
and edi, ebx
mov ebx, dword [eax + 4]
xor ebx, 0xff
dec ebx
shr ebx, 0x1f
and edi, ebx
mov ebx, dword [eax]
xor ebx, 0xff
dec ebx
shr ebx, 0x1f
and edi, ebx
and ecx, edi
sub eax, 0x18
dec dword [ebp - 4]
jne 0x50ab40
mov eax, dword [edx]
sub eax, 0xed
not eax
shr eax, 0x1f
and eax, ecx
not eax
inc eax
mov ecx, eax
and ecx, 0x7f
sub esi, ecx
mov dword [edx + 0x7c], esi
mov esi, eax
pop edi
mov ecx, 0x1e
and esi, 0xff
pop ebx
jmp 0x50abd0
sub dword [edx + ecx*4], esi
dec ecx
test ecx, ecx
jg 0x50abd0
and eax, 0xed
sub dword [edx], eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x50ac80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
movzx ecx, cl
push esi
push edi
mov edi, eax
mov esi, edx
not ecx
inc ecx
lea edx, [edi + 0xc]
lea eax, [esi + 4]
sub edi, esi
mov dword [ebp - 4], 8
mov ebx, dword [edx - 0xc]
mov esi, dword [eax - 4]
xor ebx, esi
and ebx, ecx
xor ebx, esi
mov esi, dword [eax]
mov dword [eax - 4], ebx
mov ebx, dword [edi + eax]
xor ebx, esi
and ebx, ecx
xor ebx, esi
mov esi, dword [eax + 4]
mov dword [eax], ebx
mov ebx, dword [edx - 4]
xor ebx, esi
and ebx, ecx
xor ebx, esi
mov esi, dword [eax + 8]
mov dword [eax + 4], ebx
mov ebx, dword [edx]
xor ebx, esi
and ebx, ecx
xor ebx, esi
mov dword [eax + 8], ebx
add eax, 0x10
add edx, 0x10
dec dword [ebp - 4]
jne 0x50aca0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x50baf0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x899944]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, 0x7d6ed8
mov edi, 0x7d6edc
xor edx, edx
xor esi, esi
sub ebx, ecx
lea eax, [ecx + 8]
sub edi, ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], edi
mov edi, edi
add edx, dword [esi*4 + 0x7d6ed8]
movzx ecx, byte [eax - 8]
sub cl, dl
mov byte [ebp + esi - 0x24], cl
mov ecx, dword [eax - 8]
sub ecx, edx
movzx edx, byte [eax - 4]
shr ecx, 0x1f
add ecx, dword [esi*4 + 0x7d6edc]
mov edi, dword [eax + 4]
sub dl, cl
mov byte [ebp + esi - 0x23], dl
mov edx, dword [eax - 4]
sub edx, ecx
movzx ecx, byte [eax]
shr edx, 0x1f
add edx, dword [ebx + eax]
add esi, 4
sub cl, dl
mov byte [ebp + esi - 0x26], cl
mov ecx, dword [eax]
sub ecx, edx
mov edx, dword [ebp - 0x2c]
shr ecx, 0x1f
add ecx, dword [edx + eax]
movzx edx, byte [eax + 4]
sub dl, cl
sub edi, ecx
mov byte [ebp + esi - 0x25], dl
shr edi, 0x1f
add eax, 0x10
mov edx, edi
cmp esi, 0x20
jl 0x50bb20
mov eax, dword [ebp - 0x28]
lea ecx, [edi - 1]
xor edx, edx
mov esi, dword [eax - 8]
movzx edi, byte [ebp + edx - 0x24]
xor edi, esi
and edi, ecx
xor edi, esi
mov esi, dword [eax - 4]
mov dword [eax - 8], edi
movzx edi, byte [ebp + edx - 0x23]
xor edi, esi
and edi, ecx
xor edi, esi
mov esi, dword [eax]
mov dword [eax - 4], edi
movzx edi, byte [ebp + edx - 0x22]
xor edi, esi
and edi, ecx
xor edi, esi
mov esi, dword [eax + 4]
mov dword [eax], edi
movzx edi, byte [ebp + edx - 0x21]
xor edi, esi
and edi, ecx
xor edi, esi
mov dword [eax + 4], edi
add edx, 4
add eax, 0x10
cmp edx, 0x20
jl 0x50bb92
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret
Function at 0x50c370
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x899944]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
sub ebx, esi
mov dword [ebp - 0x34], ebx
push edi
mov edi, edx
mov ebx, edi
sub ebx, esi
lea eax, [esi + 4]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x30], ebx
mov ebx, esi
xor edx, edx
lea ecx, [edi + 8]
sub ebx, edi
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ebx
jmp 0x50c3b0
mov esi, dword [esi + edx*4]
add esi, dword [eax - 4]
mov ebx, dword [ebp - 0x30]
mov dword [ecx - 8], esi
mov esi, dword [ebp - 0x34]
mov esi, dword [esi + eax]
add esi, dword [eax]
add edx, 4
mov dword [ebx + eax], esi
mov esi, dword [ebp - 0x28]
mov esi, dword [esi + ecx]
add esi, dword [eax + 4]
add eax, 0x10
mov dword [ecx], esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + edx*4 - 4]
add ebx, dword [eax - 8]
add ecx, 0x10
mov dword [ecx - 0xc], ebx
cmp edx, 0x20
jl 0x50c3b0
xor eax, eax
nop
mov ecx, dword [edi + eax*4]
mov edx, ecx
movzx ecx, cl
shr edx, 8
add dword [edi + eax*4 + 4], edx
mov dword [edi + eax*4], ecx
inc eax
cmp eax, 0x1f
jl 0x50c3f0
mov eax, dword [ebp - 0x2c]
mov ebx, 0x7d6ed8
mov ecx, 0x7d6edc
xor edx, edx
xor esi, esi
sub ebx, edi
sub ecx, edi
mov dword [ebp - 0x28], ecx
add edx, dword [esi*4 + 0x7d6ed8]
movzx ecx, byte [eax - 8]
sub cl, dl
mov byte [ebp + esi - 0x24], cl
mov ecx, dword [eax - 8]
sub ecx, edx
movzx edx, byte [eax - 4]
shr ecx, 0x1f
add ecx, dword [esi*4 + 0x7d6edc]
mov edi, dword [eax + 4]
sub dl, cl
mov byte [ebp + esi - 0x23], dl
mov edx, dword [eax - 4]
sub edx, ecx
movzx ecx, byte [eax]
shr edx, 0x1f
add edx, dword [ebx + eax]
add esi, 4
sub cl, dl
mov byte [ebp + esi - 0x26], cl
mov ecx, dword [eax]
sub ecx, edx
mov edx, dword [ebp - 0x28]
shr ecx, 0x1f
add ecx, dword [edx + eax]
movzx edx, byte [eax + 4]
sub dl, cl
sub edi, ecx
mov byte [ebp + esi - 0x25], dl
shr edi, 0x1f
add eax, 0x10
mov edx, edi
cmp esi, 0x20
jl 0x50c420
mov eax, dword [ebp - 0x2c]
lea ecx, [edi - 1]
xor edx, edx
mov esi, dword [eax - 8]
movzx edi, byte [ebp + edx - 0x24]
xor edi, esi
and edi, ecx
xor edi, esi
mov esi, dword [eax - 4]
mov dword [eax - 8], edi
movzx edi, byte [ebp + edx - 0x23]
xor edi, esi
and edi, ecx
xor edi, esi
mov esi, dword [eax]
mov dword [eax - 4], edi
movzx edi, byte [ebp + edx - 0x22]
xor edi, esi
and edi, ecx
xor edi, esi
mov esi, dword [eax + 4]
mov dword [eax], edi
movzx edi, byte [ebp + edx - 0x21]
xor edi, esi
and edi, ecx
xor edi, esi
mov dword [eax + 4], edi
add edx, 4
add eax, 0x10
cmp edx, 0x20
jl 0x50c492
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret
Function at 0x50cce0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
add esi, 2
sub edi, eax
mov ecx, 0x1f
lea esp, [esp]
mov dl, byte [edi + eax]
mov bl, byte [eax]
and dl, 3
add dl, dl
add dl, dl
and bl, 3
xor dl, bl
mov byte [esi - 2], dl
mov edx, dword [edi + eax]
mov ebx, dword [eax]
shr edx, 2
and dl, 3
add dl, dl
add dl, dl
shr ebx, 2
and bl, 3
xor dl, bl
mov byte [esi - 1], dl
mov edx, dword [edi + eax]
mov ebx, dword [eax]
shr edx, 4
and dl, 3
add dl, dl
add dl, dl
shr ebx, 4
and bl, 3
xor dl, bl
mov byte [esi], dl
mov edx, dword [edi + eax]
mov ebx, dword [eax]
shr edx, 6
and dl, 3
add dl, dl
shr ebx, 6
add dl, dl
and bl, 3
xor dl, bl
mov byte [esi + 1], dl
add eax, 4
add esi, 4
dec ecx
jne 0x50cd00
mov eax, dword [ebp + 0x10]
mov cl, byte [eax + 0x7c]
mov esi, dword [ebp + 0xc]
mov dl, byte [esi + 0x7c]
mov edi, dword [ebp + 8]
and cl, 3
add cl, cl
add cl, cl
and dl, 3
xor cl, dl
mov byte [edi + 0x7c], cl
mov ecx, dword [eax + 0x7c]
mov edx, dword [esi + 0x7c]
shr ecx, 2
and cl, 3
add cl, cl
add cl, cl
shr edx, 2
and dl, 3
xor cl, dl
mov byte [edi + 0x7d], cl
mov eax, dword [eax + 0x7c]
mov ecx, dword [esi + 0x7c]
shr eax, 4
and al, 3
add al, al
shr ecx, 4
add al, al
and cl, 3
xor al, cl
mov byte [edi + 0x7e], al
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x50cf60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x899944]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov esi, edx
mov ecx, 0x20
lea edi, [ebp - 0x104]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], ecx
mov dword [eax + 0x28], ecx
mov dword [eax + 0x2c], ecx
mov dword [eax + 0x30], ecx
mov dword [eax + 0x34], ecx
mov dword [eax + 0x38], ecx
mov dword [eax + 0x3c], ecx
mov dword [eax + 0x40], ecx
mov dword [eax + 0x44], ecx
mov dword [eax + 0x48], ecx
mov dword [eax + 0x4c], ecx
mov dword [eax + 0x50], ecx
mov dword [eax + 0x54], ecx
mov dword [eax + 0x58], ecx
mov dword [eax + 0x5c], ecx
mov dword [eax + 0x60], ecx
mov dword [eax + 0x64], ecx
mov dword [eax + 0x68], ecx
mov dword [eax + 0x6c], ecx
mov dword [eax + 0x70], ecx
mov dword [eax + 0x74], ecx
mov dword [eax + 0x78], ecx
mov dword [eax + 0x7c], ecx
mov ecx, dword [eax]
mov edx, dword [eax + 0x7c]
add ecx, 0x1da
add edx, 0xfe
mov dword [ebp - 0x84], ecx
mov dword [ebp - 8], edx
mov ecx, 1
jmp 0x50d010
mov edx, dword [eax + ecx*4]
add edx, 0x1fe
mov dword [ebp + ecx*4 - 0x84], edx
inc ecx
cmp ecx, 0x1f
jl 0x50d010
lea edx, [ebp - 0x84]
sub edx, eax
mov dword [ebp - 0x10c], edx
lea edx, [ebp - 0x80]
sub edx, eax
lea esi, [ebp - 0x104]
lea edi, [ebp - 0x100]
sub esi, eax
sub edi, eax
mov dword [ebp - 0x108], edx
lea ecx, [eax + 8]
xor edx, edx
push ebx
jmp 0x50d060
mov ebx, dword [ebp + edx - 0x84]
sub ebx, dword [ebp + edx - 0x104]
add edx, 0x10
mov dword [ecx - 8], ebx
mov ebx, dword [ebp + edx - 0x90]
sub ebx, dword [ebp + edx - 0x110]
add ecx, 0x10
mov dword [ecx - 0x14], ebx
mov ebx, dword [ebp - 0x10c]
mov ebx, dword [ebx + ecx - 0x10]
sub ebx, dword [esi + ecx - 0x10]
mov dword [ecx - 0x10], ebx
mov ebx, dword [ebp - 0x108]
mov ebx, dword [ebx + ecx - 0x10]
sub ebx, dword [edi + ecx - 0x10]
mov dword [ecx - 0xc], ebx
cmp edx, 0x80
jl 0x50d060
mov esi, 4
pop ebx
mov edx, dword [eax + 0x7c]
mov ecx, edx
shr ecx, 7
imul ecx, ecx, 0x13
add dword [eax], ecx
and edx, 0x7f
mov dword [eax + 0x7c], edx
xor ecx, ecx
lea ecx, [ecx]
mov edx, dword [eax + ecx*4]
mov edi, edx
movzx edx, dl
shr edi, 8
add dword [eax + ecx*4 + 4], edi
mov dword [eax + ecx*4], edx
inc ecx
cmp ecx, 0x1f
jl 0x50d0d0
dec esi
jne 0x50d0b8
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret
Function at 0x50dff0
Capabilities:
Encrypt data using curve25519

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x468
mov eax, dword [0x899944]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x1c]
push 0x20
lea ecx, [edi + 0x20]
push ecx
lea edx, [ebp - 0x64]
push edx
mov dword [ebp - 0x468], eax
call fcn.0070d6a0
lea eax, [ebp - 0x44]
push eax
push 0x20
push edi
call fcn.004f6ae0
mov cl, byte [ebp - 0x25]
mov edi, dword [ebp + 0x14]
and byte [ebp - 0x44], 0xf8
mov eax, dword [ebp + 0x18]
and cl, 0x3f
or cl, 0x40
mov edx, edi
add edx, 0x40
mov byte [ebp - 0x25], cl
mov ecx, dword [ebp - 0x468]
push edi
mov dword [esi], edx
push ecx
lea edx, [ebx + 0x40]
adc eax, 0
push edx
mov dword [esi + 4], eax
call fcn.0070d6a0
push 0x20
lea eax, [ebp - 0x24]
push eax
lea esi, [ebx + 0x20]
push esi
call fcn.0070d6a0
lea ecx, [ebp - 0xe4]
push ecx
lea edx, [edi + 0x20]
push edx
push esi
call fcn.004f6ae0
lea eax, [ebp - 0x1e4]
push eax
lea ecx, [ebp - 0xe4]
call fcn.0050c010
add esp, 0x40
lea edx, [ebp - 0x1e4]
lea ecx, [ebp - 0x464]
call fcn.0050ddd0
lea ecx, [ebp - 0x464]
call fcn.0050ba30
push 0x20
lea ecx, [ebp - 0x64]
push ecx
push esi
call fcn.0070d6a0
lea edx, [ebp - 0xa4]
push edx
add edi, 0x40
push edi
push ebx
call fcn.004f6ae0
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0xa4]
call fcn.0050c010
lea ecx, [ebp - 0x264]
push ecx
lea ecx, [ebp - 0x44]
call fcn.0050bbf0
lea edx, [ebp - 0x264]
push edx
lea eax, [ebp - 0x164]
push eax
mov ecx, eax
push ecx
call fcn.0050c4f0
lea edx, [ebp - 0x164]
push edx
lea ecx, [ebp - 0x1e4]
call fcn.0050c370
add esp, 0x30
xor eax, eax
mov cl, byte [ebp + eax*4 - 0x164]
mov byte [esi + eax], cl
inc eax
cmp eax, 0x20
jl 0x50e123
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret
Function at 0x511dc0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x899944]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x8967cc], 0
jne 0x511dec
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret
push edi
push 0x190
lea eax, [ebp - 0x218]
push 0
push eax
mov dword [ebp - 0x220], 1
call fcn.0070dc20
mov edi, dword [sym.imp.WS2_32.dll_WSAStartup]
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
push 0x909
call edi
mov dword [ebp - 0x220], eax
cmp eax, 0x276c
jne 0x511efd
mov ecx, 5
push esi
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x21c], 2
jmp 0x511e56
mov ecx, dword [ebp - 0x224]
cmp ecx, 1
jl 0x511eb9
dec dword [ebp - 0x21c]
jns 0x511e74
dec ecx
mov dword [ebp - 0x21c], 9
mov dword [ebp - 0x224], ecx
test ecx, ecx
je 0x511eb9
movzx edx, byte [ebp - 0x21c]
movzx eax, cl
push 0x190
shl dx, 8
lea ecx, [ebp - 0x218]
or dx, ax
push 0
push ecx
movzx esi, dx
call fcn.0070dc20
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push esi
call edi
mov dword [ebp - 0x220], eax
cmp eax, 0x276c
je 0x511e50
pop esi
test eax, eax
jne 0x511f05
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x224]
push ecx
push str.Using_ws2_32.dll_version__d__d
lea edx, [ebp - 0x88]
push 0x50
push edx
call fcn.00421b80
mov eax, dword [ebx]
mov edx, dword [eax + 0x2c]
add esp, 0x14
lea ecx, [ebp - 0x88]
push ecx
push str.ws2_32_DLL_Version
mov ecx, ebx
call edx
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x511f8b
cmp eax, 0x276b
jne 0x511f18
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.The_underlying_network_subsystem_is_not_ready_for_network_communication.
jmp 0x511f87
cmp eax, 0x276c
jne 0x511f2b
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.The_version_of_Windows_Sockets_support_requested_is_not_provided_by_this_particular_Windows_Sockets_implementation.
jmp 0x511f87
cmp eax, 0x2734
jne 0x511f3e
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.A_blocking_Windows_Sockets_1.1_operation_is_in_progress.
jmp 0x511f87
cmp eax, 0x2753
jne 0x511f51
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.Limit_on_the_number_of_tasks_supported_by_the_Windows_Sockets_implementation_has_been_reached.
jmp 0x511f87
cmp eax, 0x271e
jne 0x511f64
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push str.The_lpWSAData_is_not_a_valid_pointer.
jmp 0x511f87
lea eax, [ebp - 0x220]
push eax
push str.WSAStartup_error:_0x_x
lea ecx, [ebp - 0x38]
push 0x32
push ecx
call fcn.00421b60
mov edx, dword [ebx]
mov edx, dword [edx + 0x14]
add esp, 0x10
lea eax, [ebp - 0x38]
push eax
mov ecx, ebx
call edx
mov edi, ebx
mov byte [0x8967cc], 0
call fcn.00511cd0
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebp - 0x220], eax
pop edi
sete al
xor ecx, ebp
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret
Function at 0x512340
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
cmp dword [ebx + 0xc], 0x4901fb2a
je 0x51236d
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
push str.Internal_error:_Socket_object_already_deleted.
call edx
push 0
call fcn.0040a460
add esp, 4
pop ebx
pop ebp
ret 8
mov eax, dword [ebp + 8]
cmp dword [ebx + 0x14], eax
push esi
lea esi, [ebx + 0x14]
je 0x5123e5
test eax, eax
je 0x5123e5
cmp eax, 0x1000
jb 0x5123e5
cmp eax, 0x800000
jbe 0x512390
mov eax, 0x800000
and eax, 0xfffff000
cmp dword [ebx + 0xb4], 0xffffffff
mov dword [esi], eax
je 0x5123e5
push edi
mov edi, dword [ebp + 0xc]
cmp byte [edi + 0xad], 0
je 0x5123ca
mov eax, dword [edi]
mov edx, dword [eax + 0x18]
push str.Setting_SO_SNDBUF_size
mov ecx, edi
call edx
mov eax, dword [esi]
push eax
push str.sendBufSize
mov ecx, edi
call fcn.00474a80
mov ecx, dword [ebx + 0xb4]
push 4
push esi
push 0x1001
push 0xffff
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x512480
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
cmp dword [esi + 0xb4], 0xffffffff
je 0x512508
cmp byte [ebp + 8], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], 1
mov dword [ebp - 8], 0
je 0x5124dc
cmp byte [ecx + 0xad], 0
je 0x5124be
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
push str.Turning_on_TCP_NODELAY.
call edx
mov ecx, dword [esi + 0xb4]
push 4
lea eax, [ebp - 4]
push eax
push 1
push 6
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
mov esp, ebp
pop ebp
ret 8
cmp byte [ecx + 0xad], 0
je 0x5124f1
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
push str.Turning_off_TCP_NODELAY.
call eax
mov edx, dword [esi + 0xb4]
push 4
lea ecx, [ebp - 8]
push ecx
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x512510
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 0xb4]
sub esp, 8
cmp eax, 0xffffffff
jne 0x512529
xor al, al
mov esp, ebp
pop ebp
ret 8
cmp byte [ebp + 8], 0
mov dword [ebp - 4], 1
mov dword [ebp - 8], 0
push 4
je 0x512545
lea ecx, [ebp - 4]
push ecx
jmp 0x512549
lea edx, [ebp - 8]
push edx
push 8
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov al, 1
mov esp, ebp
pop ebp
ret 8
Function at 0x514620
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x14]
mov esi, ecx
push edi
mov dword [esi + 0xb4], eax
call fcn.005122c0
push edi
mov ecx, esi
call fcn.00512240
mov eax, dword [esi + 0xb4]
cmp eax, 0xffffffff
je 0x514663
lea ecx, [ebp + 8]
push ecx
push 0x8004667e
push eax
mov dword [ebp + 8], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
movzx edx, byte [ebp + 0x10]
neg edx
sbb edx, edx
and edx, 0x15
add edx, 2
cmp dword [esi + 0xb4], 0xffffffff
mov dword [esi + 0xb8], edx
jne 0x514694
xor al, al
pop edi
mov byte [esi + 0xb0], al
mov byte [esi + 0xb2], al
pop esi
pop ebp
ret 0x10
mov al, byte [ebp + 0xc]
pop edi
mov byte [esi + 0xb0], 1
mov byte [esi + 0x276], al
mov byte [esi + 0xb2], 0
pop esi
pop ebp
ret 0x10

Function at 0x5146f0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x748318
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x899944]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
push str.ck_getsockname_ipv4
mov dword [ebp - 0x28], ecx
push esi
lea ecx, [ebp - 0x34]
call fcn.00474ef0
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.0040a470
mov eax, dword [ebp - 0x28]
mov dword [ebx], 0
mov eax, dword [eax + 0xb4]
cmp eax, 0xffffffff
je 0x5147cc
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x20]
push edx
push eax
mov dword [ebp - 0x24], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x5147aa
test eax, eax
js 0x5147aa
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
mov ecx, edi
call fcn.0040c0a0
mov ecx, dword [ebp - 0x1e]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, ax
lea ecx, [ebp - 0x34]
mov dword [ebx], edx
mov dword [ebp - 4], 0xffffffff
call fcn.00474f80
mov al, 1
jmp 0x5147eb
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_getsockname
mov ecx, esi
call edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
push 0
push eax
call fcn.005126e0
add esp, 0xc
jmp 0x5147da
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Cannot_get_socket_name:_INVALID_SOCKET.
mov ecx, esi
call edx
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0xffffffff
call fcn.00474f80
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0070bb4c
mov esp, ebp
pop ebp
ret 0xc