joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a6330
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push esi
xor esi, esi
mov dword [esp + 4], esi
mov dword [eax], esi
lea eax, [esp + 8]
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x4a64e2
push ebx
mov ebx, dword [esp + 0xc]
push edi
test ebx, ebx
je 0x4a64cc
push ebp
mov eax, dword [ebx + 4]
cmp eax, 2
jne 0x4a637f
lea ebp, [eax + 0xe]
jmp 0x4a638b
cmp eax, 0x17
jne 0x4a6439
lea ebp, [eax + 5]
cmp dword [ebx + 0x18], 0
je 0x4a6439
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x4a6439
cmp eax, ebp
jb 0x4a6439
push 0x20
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
je 0x4a64c1
mov ecx, dword [ebx]
mov dword [edi], ecx
mov ecx, dword [ebx + 4]
mov dword [edi + 4], ecx
mov ecx, dword [ebx + 8]
mov dword [edi + 8], ecx
mov eax, dword [ebx + 0xc]
push ebp
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], ebp
mov dword [edi + 0x18], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
call dword [section..data]
add esp, 4
mov dword [edi + 0x18], eax
test eax, eax
je 0x4a64b0
push ebp
push dword [ebx + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x14]
add esp, 0xc
test eax, eax
je 0x4a6425
push eax
call dword [0x6d000c]
add esp, 4
mov dword [edi + 0x14], eax
test eax, eax
je 0x4a6496
mov eax, dword [esp + 0x10]
test esi, esi
cmove esi, edi
test eax, eax
je 0x4a6435
mov dword [eax + 0x1c], edi
mov dword [esp + 0x10], edi
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x4a6372
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
pop ebp
test eax, eax
je 0x4a6458
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebx, ebx
je 0x4a64c8
test esi, esi
je 0x4a6485
push dword [esi + 0x18]
call dword [0x6d0004]
push dword [esi + 0x14]
call dword [0x6d0004]
mov edi, dword [esi + 0x1c]
push esi
call dword [0x6d0004]
add esp, 0xc
mov esi, edi
test edi, edi
jne 0x4a6460
mov eax, dword [esp + 0x28]
xor esi, esi
pop edi
mov dword [eax], esi
mov eax, ebx
pop ebx
pop esi
add esp, 0xc
ret
push dword [edi + 0x18]
mov ebx, 8
call dword [0x6d0004]
push edi
call dword [0x6d0004]
add esp, 8
jmp 0x4a6448
push edi
mov ebx, 8
call dword [0x6d0004]
add esp, 4
jmp 0x4a6448
mov ebx, 8
jmp 0x4a6448
test esi, esi
jne 0x4a64d8
mov ebx, 0x2af9
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
pop edi
mov dword [eax], esi
mov eax, ebx
pop ebx
pop esi
add esp, 0xc
ret

Function at 0x4a6940
Capabilities:
Create thread

Disassembly:
push 0
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
test eax, eax
je 0x4a6962
cmp eax, 0xffffffff
jne 0x4a6964
xor eax, eax
ret
Function at 0x4aa1a0
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
xor ebp, ebp
push esi
push edi
lea esi, [ebp + 1]
push esi
push ebp
call dword [0x6d0008]
mov edi, eax
add esp, 8
test edi, edi
je 0x4aa1f7
nop word [eax + eax]
push esi
push edi
push dword [esp + 0x1c]
mov ebp, edi
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x4aa20f
cmp esi, ebx
je 0x4aa20f
cmp esi, 0x8000
ja 0x4aa20f
cmp esi, ebx
jb 0x4aa208
push esi
push edi
call dword [0x6d0008]
mov edi, eax
add esp, 8
test edi, edi
jne 0x4aa1c0
push ebp
call dword [0x6d0004]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call dword [0x6d0004]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret

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

Disassembly:
sub esp, 0x88
mov eax, dword [0x6d3f68]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x9c]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0x80
push eax
mov ebp, dword [edi + 0x424]
or esi, 0xffffffff
mov ebx, dword [edi]
push ebp
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4afb42
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
push ebp
push edi
call fcn.00496440
add esp, 8
cmp esi, 0xffffffff
jne 0x4afb66
push str.Error_accept__ing_server_connect
push ebx
call fcn.00495860
add esp, 8
mov eax, 0x1e
jmp 0x4afbd5
push str.Connection_accepted_from_server_n
push ebx
call fcn.00495940
push 1
push esi
mov byte [edi + 0x514], 0
mov dword [edi + 0x424], esi
call fcn.004a24b0
add esp, 0x10
mov byte [edi + 0x7f0], 1
cmp dword [ebx + 0x610], 0
je 0x4afbd3
push 1
push ebx
call fcn.00486cd0
mov eax, dword [ebx + 0x610]
push 1
push esi
push dword [ebx + 0x614]
call eax
push 0
push ebx
mov esi, eax
call fcn.00486cd0
add esp, 0x1c
test esi, esi
je 0x4afbd3
push edi
call fcn.004b0070
add esp, 4
mov eax, 0x2a
jmp 0x4afbd5
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0062e5ad
add esp, 0x88
ret
Function at 0x4b6ff0
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
mov byte [esp + 0x16], al
lea eax, [esp + 0x14]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x420]
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4b703c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.00495860
add esp, 0xc
push dword [esp + 0x18]
push ebx
push str.SENT
push dword [esi]
call fcn.004b6c00
add esp, 0x10
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
mov eax, dword [esp + 8]
push ebx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov ebx, dword [eax + 0x14c]
jne 0x4b72ce
push ebp
push edi
lea ebp, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], ebp
cmp ebp, edi
jae 0x4b71ce
lea eax, [ebp + 1]
mov byte [ebp], 0xff
mov dword [edi], eax
cmp eax, edi
jae 0x4b71ce
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b71ce
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
movzx eax, ax
mov dword [esp + 0x1c], eax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov edx, dword [esp + 0x1c]
movzx ecx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x4b7239
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b7239
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b7239
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b7239
shr ecx, 8
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b7239
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b7239
mov byte [eax], 0xf0
mov eax, dword [edi]
inc eax
mov esi, dword [esp + 0x10]
mov dword [ebx + 0x1eb4], eax
sub eax, ebp
sub eax, 2
mov dword [edi], ebp
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push esi
call fcn.004b6d00
mov edi, dword [esp + 0x28]
add esp, 0x10
push 0
push 3
push ebp
push dword [edi + 0x420]
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x4b728d
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00495860
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push edi
call fcn.004b7060
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [edi + 0x420]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4b72cb
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00495860
add esp, 0xc
pop esi
pop edi
pop ebp
pop ebx
pop ecx
ret
Function at 0x4cadc0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
jne 0x4cade7
pop edi
pop esi
pop ecx
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x1c]
mov dword [edi + 8], eax
push ebp
cmp ebx, dword [esi + 0x10]
jbe 0x4cae32
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [esp + 0x24]
push dword [edi + 4]
call eax
mov ebp, dword [edi + 8]
push dword [edi + 4]
add ebp, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ebp
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov ecx, dword [edi + 4]
mov dword [esp + 0x20], ebx
jmp 0x4cae36
mov ebp, dword [esp + 0x1c]
mov eax, dword [esi]
push ecx
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [esp + 0x28]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x4cae96
mov dword [esp + 0x10], eax
mov ebx, eax
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x24], al
lea eax, [esp + 0x24]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub ebx, 1
jne 0x4cae55
mov ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0x10]
jae 0x4caec7
nop dword [eax + eax]
mov eax, dword [esi + 4]
push 1
push 0x645cdf
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x645ce0
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x4caea0
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
pop ecx
ret
Function at 0x4e6480
Capabilities:
Hash data using sha1

Disassembly:
mov eax, 0x40
call fcn.0062f130
mov eax, dword [0x6d3f68]
xor eax, esp
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x48], 0x1d
push esi
mov esi, dword [esp + 0x48]
push edi
mov edi, dword [esp + 0x58]
je 0x4e64bc
pop edi
mov eax, 0xfffffffe
pop esi
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.0062e5ad
add esp, 0x40
ret
test esi, esi
je 0x4e65cb
cmp dword [esp + 0x54], 0x30
jne 0x4e65cb
push 0x30
push edi
push esi
call fcn.004e63a0
add esp, 0xc
test eax, eax
jle 0x4e65cb
movaps xmm0, xmmword [str.6666666666666666_]
lea eax, [esp + 8]
push 0x28
push eax
push esi
movups xmmword [esp + 0x14], xmm0
movups xmmword [esp + 0x24], xmm0
movq qword [esp + 0x34], xmm0
call fcn.004e63a0
add esp, 0xc
test eax, eax
je 0x4e65cb
lea eax, [esp + 0x30]
push esi
push eax
call fcn.004e6200
add esp, 8
test eax, eax
je 0x4e65cb
push 0x4c
lea eax, [esi + 0x14]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x30
push edi
push esi
mov dword [esi], 0x67452301
mov dword [esi + 4], 0xefcdab89
mov dword [esi + 8], 0x98badcfe
mov dword [esi + 0xc], 0x10325476
mov dword [esi + 0x10], 0xc3d2e1f0
call fcn.004e63a0
add esp, 0x18
test eax, eax
jle 0x4e65cb
movaps xmm0, xmmword [0x646190]
lea eax, [esp + 8]
push 0x28
push eax
push esi
movups xmmword [esp + 0x14], xmm0
movups xmmword [esp + 0x24], xmm0
movq qword [esp + 0x34], xmm0
call fcn.004e63a0
add esp, 0xc
test eax, eax
je 0x4e65cb
push 0x14
lea eax, [esp + 0x34]
push eax
push esi
call fcn.004e63a0
add esp, 0xc
test eax, eax
je 0x4e65cb
lea eax, [esp + 0x30]
push 0x14
push eax
call fcn.00401320
add esp, 8
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.0062e5ad
add esp, 0x40
ret
mov ecx, dword [esp + 0x44]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0062e5ad
add esp, 0x40
ret
Function at 0x4e8070
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x14
call fcn.0062f130
mov eax, dword [esp + 0x2c]
push esi
mov esi, dword [eax]
test esi, esi
jns 0x4e8090
mov dword [eax], 0xffffffff
pop esi
add esp, 0x14
ret
push ebx
mov ebx, dword [esp + 0x24]
push ebp
mov ebp, dword [esp + 0x24]
push edi
mov edi, dword [esp + 0x30]
test esi, esi
je 0x4e80bc
mov ecx, dword [esp + 0x38]
test edi, edi
je 0x4e80bc
mov al, byte [esi + ecx]
dec edi
xor al, byte [ebp]
inc esi
mov byte [ebx], al
inc ebp
inc ebx
and esi, 0xf
jne 0x4e80a7
mov edx, dword [esp + 0x40]
cmp edi, 0x10
jb 0x4e8155
mov ecx, dword [esp + 0x38]
mov eax, ebx
sub eax, ecx
mov dword [esp + 0x14], eax
mov eax, ebp
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, edi
shr eax, 4
mov dword [esp + 0x10], eax
shl eax, 4
add ebx, eax
add ebp, eax
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x18]
jmp 0x4e8104
mov ecx, dword [esp + 0x38]
push dword [esp + 0x34]
push ecx
push ecx
call edx
add esp, 0xc
cmp esi, 0x10
jae 0x4e8137
mov eax, dword [esp + 0x38]
mov edx, 0xf
sub edx, esi
add eax, esi
shr edx, 2
inc edx
mov ecx, dword [eax + ebp]
lea eax, [eax + 4]
xor ecx, dword [eax - 4]
mov dword [ebx + eax - 4], ecx
sub edx, 1
jne 0x4e8125
mov edx, dword [esp + 0x40]
sub edi, 0x10
add ebx, 0x10
add ebp, 0x10
xor esi, esi
sub dword [esp + 0x10], 1
jne 0x4e8100
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
test edi, edi
je 0x4e8187
push dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
push eax
push eax
call edx
mov eax, dword [esp + 0x44]
add esp, 0xc
sub ebp, eax
sub ebx, eax
lea ecx, [esi + eax]
add esi, edi
mov al, byte [ecx + ebp]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
mov byte [ecx + ebx - 1], al
sub edi, 1
jne 0x4e8175
mov eax, dword [esp + 0x3c]
pop edi
pop ebp
pop ebx
mov dword [eax], esi
pop esi
add esp, 0x14
ret
Function at 0x4ff190
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov eax, 4
call fcn.0062f130
push edi
mov edi, dword [esp + 0xc]
mov dword [esp + 4], 1
cmp edi, 0xffffffff
jne 0x4ff1d8
call fcn.004dd410
push str.BIO_connect
push 0x5f
push str.crypto_bio_bio_sock2.c
call fcn.004dd510
push 0
push 0x87
push 0x20
call fcn.004dd5c0
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.005084a0
add esp, 8
test eax, eax
je 0x4ff267
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
test bl, 4
je 0x4ff26e
push 4
lea eax, [esp + 0x10]
push eax
push 8
push 0xffff
push edi
call esi
test eax, eax
je 0x4ff26e
call fcn.004dd410
push str.BIO_connect
push 0x69
push str.crypto_bio_bio_sock2.c
call fcn.004dd510
add esp, 0xc
push str.calling_setsockopt__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.004dd5c0
call fcn.004dd410
push str.BIO_connect
push 0x6b
push str.crypto_bio_bio_sock2.c
call fcn.004dd510
push 0
push 0x89
push 0x20
call fcn.004dd5c0
add esp, 0x24
pop esi
pop ebx
xor eax, eax
pop edi
pop ecx
ret
test bl, 0x10
je 0x4ff2df
push 4
lea eax, [esp + 0x10]
push eax
push 1
push 6
push edi
call esi
test eax, eax
je 0x4ff2df
call fcn.004dd410
push str.BIO_connect
push 0x73
push str.crypto_bio_bio_sock2.c
call fcn.004dd510
add esp, 0xc
push str.calling_setsockopt__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.004dd5c0
call fcn.004dd410
push str.BIO_connect
push 0x75
push str.crypto_bio_bio_sock2.c
call fcn.004dd510
push 0
push 0x8a
push 0x20
call fcn.004dd5c0
add esp, 0x24
xor eax, eax
pop esi
pop ebx
pop edi
pop ecx
ret
mov esi, dword [esp + 0x18]
push esi
call fcn.00508630
add esp, 4
push eax
push esi
call fcn.00484c10
add esp, 4
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4ff36b
push eax
call fcn.004d4f60
add esp, 4
test eax, eax
jne 0x4ff267
call fcn.004dd410
push str.BIO_connect
push 0x7d
push str.crypto_bio_bio_sock2.c
call fcn.004dd510
add esp, 0xc
push str.calling_connect__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.004dd5c0
call fcn.004dd410
push str.BIO_connect
push 0x7f
push str.crypto_bio_bio_sock2.c
call fcn.004dd510
push 0
push 0x67
push 0x20
call fcn.004dd5c0
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 0x500660
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov cl, byte [esp + 0x10]
movzx eax, cl
push esi
mov esi, dword [esp + 0x10]
and eax, 1
test esi, esi
je 0x5006a2
push ebx
mov ebx, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x14]
add edi, esi
add ebx, 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 0x500681
pop edi
pop ebx
pop esi
ret
Function at 0x508400
Capabilities:
Initialize winsock library

Disassembly:
cmp dword [0x6d6648], 0
jne 0x508499
push 0x190
push 0
push 0x6d6650
mov dword [0x6d6648], 1
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x6d6650
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x508499
call fcn.004dd410
push str.BIO_sock_init
push 0x92
push str.crypto_bio_bio_sock.c
call fcn.004dd510
add esp, 0xc
push str.calling_wsastartup__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.004dd5c0
call fcn.004dd410
push str.BIO_sock_init
push 0x94
push str.crypto_bio_bio_sock.c
call fcn.004dd510
push 0
push 0x7a
push 0x20
call fcn.004dd5c0
add esp, 0x24
or eax, 0xffffffff
ret
mov eax, 1
ret

Function at 0x5084a0
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 0x5084f5
call fcn.004dd410
push str.BIO_socket_ioctl
push 0xcf
push str.crypto_bio_bio_sock.c
call fcn.004dd510
add esp, 0xc
push str.calling_ioctlsocket__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.004dd5c0
add esp, 0xc
xor eax, eax
test esi, esi
pop esi
sete al
ret
Function at 0x509070
Capabilities:
Get common file path

Disassembly:
mov eax, 0x230
call fcn.0062f130
mov eax, dword [0x6d3f68]
xor eax, esp
mov dword [esp + 0x22c], eax
cmp dword [0x6d67e8], 0
mov dword [esp], 0x661db0
mov dword [esp + 4], 0x508a40
mov dword [esp + 8], 0x661dbc
mov dword [esp + 0xc], 0x508e10
mov dword [esp + 0x10], 0x661dc8
mov dword [esp + 0x14], 0x5089f0
jne 0x5091d3
push 0x104
lea eax, [esp + 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x5091c9
push ebx
push ebp
push esi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
lea eax, [esp + 0x130]
push edi
push eax
lea eax, [esp + 0x2c]
push 0x10c
push eax
call esi
push str.ws2_32
lea eax, [esp + 0x38]
push 0x10c
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
add esp, 0x18
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test edi, edi
je 0x509141
push 0x661db0
push edi
call ebx
test eax, eax
jne 0x50918a
push edi
call ebp
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x2c]
push 0x10c
push eax
call esi
push str.wship6
lea eax, [esp + 0x38]
push 0x10c
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
add esp, 0x18
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x5091c5
push 0x661db0
push edi
call ebx
test eax, eax
je 0x5091c2
xor esi, esi
nop dword [eax]
push dword [esp + esi*8 + 0x10]
push edi
call ebx
mov dword [esp + esi*8 + 0x14], eax
test eax, eax
je 0x5091c2
inc esi
cmp esi, 3
jl 0x509190
mov eax, dword [esp + 0x14]
mov dword [0x6d0504], eax
mov eax, dword [esp + 0x1c]
mov dword [0x6d050c], eax
mov eax, dword [esp + 0x24]
mov dword [0x6d0514], eax
jmp 0x5091c5
push edi
call ebp
pop edi
pop esi
pop ebp
pop ebx
mov dword [0x6d67e8], 1
movzx eax, word [esp + 0x234]
mov ecx, dword [esp + 0x22c]
xor ecx, esp
mov eax, dword [eax*8 + 0x6d0504]
call fcn.0062e5ad
add esp, 0x230
ret 4
Function at 0x509200
Capabilities:
Resolve dns

Disassembly:
mov eax, 0x820
call fcn.0062f130
mov eax, dword [0x6d3f68]
xor eax, esp
mov dword [esp + 0x81c], eax
push ebx
mov ebx, dword [esp + 0x83c]
lea eax, [esp + 0x18]
push ebp
push esi
mov esi, dword [esp + 0x830]
push edi
push 0x401
push 0
push eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], 0
call sub.VCRUNTIME140.dll_memset
push 0x401
lea eax, [esp + 0x438]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x400
push esi
lea eax, [esp + 0x44]
push 0x401
push eax
mov dword [esp + 0x3c], eax
lea ebp, [esp + 0x450]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
add esp, 0x28
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 0x5093d1
cmp word [ebx + 8], 2
jne 0x5092f2
cmp word [ebx + 0xa], 4
jne 0x5092f2
mov esi, dword [ebx + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x5092f2
nop word [eax + eax]
push dword [eax]
push dword [esp + 0x844]
push dword [esp + 0x844]
push dword [esp + 0x844]
call fcn.00509430
mov dword [edi], eax
test eax, eax
je 0x5093ca
add esi, 4
lea edi, [eax + 0x1c]
mov eax, dword [esi]
test eax, eax
jne 0x5092c0
push 0x400
push dword [ebx]
push 0x401
push ebp
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
mov ebx, dword [esp + 0x28]
xor esi, esi
add esp, 0x10
cmp dword [ebx], esi
jne 0x509380
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x509317
sub ecx, edx
je case.0x5093e1.11003
mov edi, dword [esp + 0x14]
mov ecx, ebp
mov eax, edi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x509350
test dl, dl
je 0x50934c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x509350
add eax, 2
add ecx, 2
test dl, dl
jne 0x509330
xor eax, eax
jmp 0x509355
sbb eax, eax
or eax, 1
test eax, eax
je case.0x5093e1.11003
mov esi, dword [esp + 0x10]
inc esi
mov dword [esp + 0x10], esi
cmp esi, 0x10
je case.0x5093e1.11003
mov esi, dword [esp + 0x1c]
mov eax, edi
mov dword [esp + 0x14], ebp
mov ebp, eax
jmp 0x509283
cmp dword [esp + 0x844], esi
je 0x5093fb
mov ecx, ebp
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x509390
sub ecx, edx
lea ebx, [ecx + 1]
push ebx
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov edi, eax
add esp, 8
test edi, edi
je 0x5093ba
push ebp
push ebx
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
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 0x5093fb
mov esi, 8
jmp 0x5093fb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x5093e1.11001
jmp dword [eax*4 + 0x509418]
mov esi, 0x2afa
jmp 0x5093fb
mov esi, 0x2afb
jmp 0x5093fb
mov esi, 0x2af9
mov ecx, dword [esp + 0x82c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0062e5ad
add esp, 0x820
ret 0x18