joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4014b9
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ecx
push ecx
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
push dword [esp + 0x1c]
mov esi, ecx
shr ebx, 2
push edx
push esi
lea eax, [ebx + 6]
mov byte [esi + 0xc0], al
call sub.msvcrt.dll_memcpy
movzx eax, byte [esi + 0xc0]
add esp, 0xc
movzx edi, bl
mov byte [esp + 0x1c], bl
lea eax, [eax*4 + 4]
cmp edi, eax
jge 0x401565
push ebp
mov eax, edi
lea ebp, [esi + edi*4]
cdq
idiv ebx
mov ecx, dword [ebp - 4]
mov dword [esp + 0x14], eax
test edx, edx
jne 0x40153b
bswap ecx
rol ecx, 8
push 4
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x14]
pop edx
movzx eax, byte [ecx]
mov al, byte [eax + str.cw]
mov byte [ecx], al
inc ecx
dec edx
jne 0x40151b
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx*4 + 0x407320]
xor ecx, dword [esp + 0x10]
bswap ecx
sub edi, ebx
mov eax, dword [esi + edi*4]
xor eax, ecx
mov dword [ebp], eax
mov al, byte [esp + 0x20]
inc al
movzx edi, al
mov byte [esp + 0x20], al
movzx eax, byte [esi + 0xc0]
lea eax, [eax*4 + 4]
cmp edi, eax
jl 0x4014f8
pop ebp
cmp byte [esp + 0x18], 0
je 0x40157b
xor byte [esi + 0x40], 0x73
xor byte [esi + 0x60], 9
xor byte [esi + 0x80], 0xe4
pop edi
pop esi
pop ebx
pop ecx
pop ecx
ret

Function at 0x401581
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
mov eax, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 4
push edi
mov ebp, dword [eax]
mov esi, ebp
shr esi, 7
mov ebx, ebp
mov eax, esi
rol ebx, 0x10
and eax, 0x1010101
and esi, 1
imul edi, eax, 0x1b
lea edx, [ebp*2]
mov eax, ebp
xor edx, ebp
rol eax, 8
xor ebx, eax
shl edx, 0x18
imul eax, esi, 0x1b000000
mov ecx, edi
xor ecx, ebp
shr ecx, 1
xor edx, eax
mov eax, ebp
and eax, 0x7f7f7f00
and ebp, 0xff7f7f7f
xor ecx, eax
add ebp, ebp
mov eax, dword [esp + 0x10]
shr ecx, 7
or edx, ecx
xor ebx, edx
xor ebx, ebp
xor ebx, edi
mov dword [eax], ebx
add eax, 4
dec dword [esp + 0x14]
mov dword [esp + 0x10], eax
jne 0x401595
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret

Function at 0x401605
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 prga
Reference aes constants

Disassembly:
sub esp, 0x18
xor al, al
push ebx
push ebp
push esi
push edi
mov ebx, edx
mov ebp, ecx
mov byte [esp + 0x13], al
mov edx, ebx
movzx eax, al
mov dword [esp + 0x14], eax
lea ecx, [eax*4]
add ecx, ebp
call fcn.004011c8
push 0x10
mov ecx, ebx
pop edx
movzx eax, byte [ecx]
mov al, byte [eax + str.cw]
mov byte [ecx], al
inc ecx
dec edx
jne 0x401632
mov esi, ebx
lea edi, [esp + 0x18]
push 0x10
mov ecx, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
mov eax, edx
add edx, 5
and eax, 0xf
mov al, byte [esp + eax + 0x18]
mov byte [ecx], al
inc ecx
dec esi
jne 0x401650
movzx eax, byte [ebp + 0xc0]
lea eax, [eax*4 - 4]
cmp dword [esp + 0x14], eax
jge 0x401685
mov ecx, ebx
call fcn.00401581
mov al, byte [esp + 0x13]
add al, 4
jmp 0x401612
movzx ecx, byte [ebp + 0xc0]
mov edx, ebx
pop edi
shl ecx, 4
pop esi
add ecx, ebp
pop ebp
pop ebx
add esp, 0x18
jmp fcn.004011c8
Function at 0x401777
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
sub esp, 0x14
push ebx
mov ebx, ecx
push ebp
push esi
push edi
movzx ecx, byte [ebx + 0xc0]
mov ebp, edx
shl ecx, 4
add ecx, ebx
mov dword [esp + 0x10], ebx
call fcn.004011c8
mov bl, byte [ebx + 0xc0]
dec bl
shl bl, 2
mov esi, ebp
lea edi, [esp + 0x14]
push 0x10
xor edx, edx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
mov ecx, edx
mov eax, edx
and ecx, 3
shl ecx, 2
sub eax, ecx
and eax, 0xf
mov al, byte [esp + eax + 0x14]
mov byte [edx + ebp], al
inc edx
dec esi
jne 0x4017b1
push 0x10
mov ecx, ebp
pop edx
movzx eax, byte [ecx]
mov al, byte [eax + 0x407350]
mov byte [ecx], al
inc ecx
dec edx
jne 0x4017d0
mov ecx, dword [esp + 0x10]
mov edx, ebp
movzx eax, bl
lea ecx, [ecx + eax*4]
call fcn.004011c8
test bl, bl
je 0x401800
mov ecx, ebp
call fcn.004011db
add bl, 0xfc
jmp 0x4017a2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret

Function at 0x401808
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push edi
mov ebp, ecx
lea edi, [ebx + 0xf0]
cmp edi, ebx
jbe 0x401837
push esi
mov edx, edi
mov ecx, ebp
call fcn.00401777
mov edx, edi
lea ecx, [edi - 0x10]
call fcn.004011c8
add edi, 0xfffffff0
cmp edi, ebx
ja 0x40181c
pop esi
mov edx, edi
mov ecx, ebp
pop edi
pop ebp
pop ebx
jmp fcn.00401777

Function at 0x401843
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
cmp dword [0x40a960], 0
jne 0x401863
push 0xf0000000
push 0x18
push 0
push 0
push 0x40a960
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
ret
mov al, 1
ret

Function at 0x401866
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 8], 0x20
mov esi, edx
mov dword [ebp - 4], ebx
mov edi, ecx
call fcn.00401843
test al, al
je 0x4018cb
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push 0x800c
push dword [0x40a960]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4018cb
push ebx
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4018cb
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x4018cb
mov bl, 1
cmp dword [ebp - 4], 0
je 0x4018da
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4018e3
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x30], 0x208
lea edi, [esp + 0x3c]
mov dword [esp + 0x34], 0x6602
xor eax, eax
mov dword [esp + 0x38], 0x10
mov esi, ecx
stosd dword es:[edi], eax
xor ebx, ebx
mov ebp, edx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], 0x20
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [esp + 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea edi, [esp + 0x3c]
mov dword [esp + 0x1c], 0x800c
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00401843
test al, al
je 0x4019cb
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
push 0x1c
lea eax, [esp + 0x40]
push eax
push dword [0x40a960]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x4019cb
lea eax, [esp + 0x10]
push eax
push ebx
push dword [esp + 0x1c]
push 0x8009
push dword [0x40a960]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4019cb
push ebx
lea eax, [esp + 0x20]
push eax
push 5
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x4019cb
push ebx
push dword [esp + 0x54]
push ebp
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4019cb
push ebx
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x5c]
push 2
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x4019cb
inc ebx
cmp dword [esp + 0x14], 0
je 0x4019dc
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [esp + 0x10], 0
je 0x4019ed
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x3c
ret

Function at 0x401cf2
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
lea eax, [ebp - 4]
mov bl, cl
mov ecx, dword [0x40ab04]
mov esi, edx
push eax
push dword [ebp + 8]
call fcn.00401be6
pop ecx
pop ecx
test eax, eax
jne 0x401d31
push dword [ebp + 8]
movsx eax, bl
push esi
push eax
push str.Fatal:_Option____c__must_be_numeric_between__u_and__u._n
call fcn.00404029
add esp, 0x10
push 0x57
call dword [sym.imp.msvcrt.dll_exit]
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401f18
Capabilities:
Terminate process

Disassembly:
push esi
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
push esi
call dword [sym.imp.msvcrt.dll_strerror]
push eax
push dword [0x40a97c]
push str.Fatal:_Could_not_read__s:__s_n
call fcn.0040408b
add esp, 0x10
push esi
call dword [sym.imp.msvcrt.dll_exit]
pop esi
Function at 0x40200b
Capabilities:
Read file on windows

Disassembly:
push ecx
mov edx, dword [0x40a97c]
mov ecx, section..data
mov dword [0x40a980], ecx
push ebx
mov ebx, 0x83d
push ebp
push esi
push edi
test edx, edx
jne 0x40203b
call fcn.00401f5f
mov ecx, dword [0x40a980]
mov edx, dword [0x40a97c]
push 2
xor esi, esi
cmp byte [edx], 0x2d
pop ebp
jne 0x402051
movzx eax, byte [edx + 1]
test al, al
je 0x40211a
push 0x40773c
push edx
call dword [sym.imp.msvcrt.dll_fopen]
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x402076
cmp byte [0x40a977], al
je 0x402114
jmp 0x4021ef
push ebp
mov ebp, dword [sym.imp.msvcrt.dll_fseek]
push esi
push edi
call ebp
add esp, 0xc
test eax, eax
jne 0x4021ef
push edi
call dword [sym.imp.msvcrt.dll_ftell]
mov ebx, eax
pop ecx
cmp ebx, 0xffffffff
je 0x4021ef
push ebx
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
test eax, eax
jne 0x4020b0
call fcn.00401dca
push esi
push esi
push edi
mov dword [0x40a980], eax
call ebp
add esp, 0xc
test eax, eax
jne 0x4021ef
push edi
push ebx
push 1
push dword [0x40a980]
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, ebx
jne 0x4021ef
push edi
call dword [sym.imp.msvcrt.dll_fclose]
cmp byte [0x40a976], 0
pop ecx
jne 0x402114
mov ecx, dword [0x40a980]
push dword [0x40a97c]
movzx eax, word [ecx + 4]
push eax
movzx eax, word [ecx + 6]
push eax
push str.Read_KMS_data_file_version__u._u__s_n
call fcn.00404019
add esp, 0x10
mov ecx, dword [0x40a980]
lea ebp, [ecx + ebx]
cmp byte [ebp - 1], 0
mov dword [esp + 0x10], ebp
jne 0x4021f4
mov edx, esi
lea eax, [ecx + 0x20]
add dword [eax], ecx
cmp dword [eax], ebp
ja 0x4021f4
inc edx
add eax, 8
cmp edx, 5
jb 0x402130
cmp byte [ecx + 8], 0
mov edi, esi
jbe 0x402166
lea edx, [ecx + 0x58]
add dword [edx - 0x10], ecx
cmp dword [edx - 0x10], ebp
ja 0x4021f4
movzx eax, byte [ecx + 8]
inc edi
add edx, 0x20
cmp edi, eax
jb 0x40214e
mov edx, esi
cmp dword [ecx + 0x18], esi
jbe 0x402183
mov edi, esi
mov eax, dword [ecx + 0x38]
add dword [eax + edi], ecx
cmp dword [eax + edi], ebp
ja 0x4021f4
inc edx
add edi, 0x20
cmp edx, dword [ecx + 0x18]
jb 0x40216f
mov edi, dword [ecx + 0xc]
add edi, dword [ecx + 0x10]
add edi, dword [ecx + 0x14]
cmp dword [ecx], 0x444d4b
jne 0x4021f4
push 2
pop eax
cmp word [ecx + 6], ax
jne 0x4021f4
mov ebp, edi
mov eax, ebx
shl ebp, 5
cdq
add ebp, 0x68
cmp esi, edx
ja 0x4021f4
jb 0x4021b2
cmp ebp, eax
jae 0x4021f4
test edi, edi
je 0x4021e9
mov ebp, dword [esp + 0x10]
mov ebx, esi
mov edx, dword [ecx + 0x20]
add edx, ebx
add dword [edx + 0x10], ecx
cmp dword [edx + 0x10], ebp
jae 0x4021f4
cmp dword [ecx + 0xc], 0
je 0x4021d8
movzx eax, byte [edx + 0x18]
cmp eax, dword [ecx + 0xc]
jge 0x4021f4
movzx eax, byte [edx + 0x19]
cmp eax, dword [ecx + 0x10]
jge 0x4021f4
inc esi
add ebx, 0x20
cmp esi, edi
jb 0x4021bc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
call fcn.00401f18
call fcn.00401f44
int3
Function at 0x403110
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ecx
cmp byte [esp + 0xc], 0
mov eax, ecx
push ebx
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_recv]
mov ebx, edx
cmovne ebp, dword [sym.imp.WS2_32.dll_send]
push esi
mov esi, dword [esp + 0x14]
push edi
mov dword [esp + 0x10], eax
push 0
push esi
push ebx
push eax
call ebp
mov edi, eax
test edi, edi
jns 0x403153
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
mov eax, dword [esp + 0x10]
je 0x403133
test edi, edi
jle 0x403161
mov eax, dword [esp + 0x10]
sub esi, edi
add ebx, edi
test esi, esi
jg 0x403133
pop edi
xor eax, eax
test esi, esi
pop esi
pop ebp
sete al
pop ebx
pop ecx
ret

Function at 0x40316e
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
lea eax, [ebp - 8]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0xa
push 8
push eax
push 0x40
pop ebx
push ebx
lea eax, [ebp - 0x48]
mov edi, ecx
push eax
push dword [ebp + 0xc]
push esi
call dword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
je 0x40319e
xor al, al
jmp 0x4031c9
cmp word [esi], 0x17
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x48]
mov ecx, str._s:_s
push eax
mov eax, str.__s_:_s
cmovne eax, ecx
push eax
push ebx
push edi
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x14
cmp ebx, eax
sbb al, al
inc al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4031d0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, edx
mov dword [ebp - 4], ecx
push esi
mov esi, ebx
push edi
lea edx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4031e3
sub esi, edx
lea edi, [esi + 1]
cmp edi, 0x108
jbe 0x4031fb
xor al, al
jmp 0x403270
mov eax, edi
call fcn.00401070
mov esi, esp
push edi
push ebx
push esi
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 8]
mov ecx, esi
push eax
lea edx, [ebp - 0xc]
call fcn.00401d5b
add esp, 0x10
lea edi, [ebp - 0x2c]
xor eax, eax
push 8
pop ecx
push dword [ebp - 4]
rep stosd dword es:[edi], eax
and dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x24], 1
push dword [ebp - 0xc]
mov dword [ebp - 0x20], 6
mov dword [ebp - 0x2c], 5
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40326e
mov ecx, eax
call fcn.004030ee
push eax
push ebx
push str.Warning:__s:__s_n
call fcn.00404029
add esp, 0xc
jmp 0x4031f7
mov al, 1
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403323
Capabilities:
Get local ipv4 addresses
Resolve dns
Terminate process

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
mov eax, 0x4000
mov dword [esp + 0x18], edx
push edi
push eax
mov ebp, ecx
mov dword [esp + 0x18], eax
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x40334e
call fcn.00401dca
mov esi, eax
mov ebx, dword [sym.imp.IPHLPAPI.DLL_GetAdaptersAddresses]
lea eax, [esp + 0x14]
push eax
push esi
push 0
push 0x2e
push 0
call ebx
mov edi, eax
cmp edi, 0x6f
jne 0x403399
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x403389
call fcn.00401dca
mov esi, eax
lea eax, [esp + 0x14]
push eax
push esi
push 0
push 0x2e
push 0
call ebx
mov edi, eax
test edi, edi
je 0x4033b8
mov ecx, edi
call fcn.00401d3a
push eax
push str.FATAL:_Could_not_get_network_address_list:__s_n
call fcn.00404029
pop ecx
pop ecx
push edi
call dword [sym.imp.msvcrt.dll_exit]
and dword [ebp], 0
mov edi, esi
test esi, esi
je 0x4033ee
cmp dword [edi + 0x44], 1
jne 0x4033e7
mov ebx, dword [edi + 0x10]
jmp 0x4033e3
mov ecx, dword [ebx + 0xc]
lea edx, [esp + 0x20]
call fcn.0040327a
test al, al
je 0x4033e0
inc dword [ebp]
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4033cd
mov edi, dword [edi + 8]
test edi, edi
jne 0x4033c2
mov eax, dword [ebp]
shl eax, 2
push eax
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
test eax, eax
jne 0x403405
call fcn.00401dca
mov ecx, dword [esp + 0x1c]
mov ebx, esi
and dword [ebp], 0
test esi, esi
mov dword [ecx], eax
jmp 0x4034b3
cmp dword [ebx + 0x44], 1
jne 0x4034ae
mov edi, dword [ebx + 0x10]
test edi, edi
je 0x4034ae
mov ebx, dword [esp + 0x1c]
mov ecx, dword [edi + 0xc]
lea edx, [esp + 0x18]
call fcn.0040327a
test al, al
je 0x4034a3
push 0x40
call dword [sym.imp.msvcrt.dll_malloc]
mov dword [esp + 0x1c], eax
pop ecx
test eax, eax
jne 0x40345b
call fcn.00401dca
mov dword [esp + 0x18], eax
push 2
push 0
push 0
push 0x40
push eax
push dword [edi + 0x10]
push dword [edi + 0xc]
call dword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
je 0x403491
mov ecx, eax
call fcn.004030ee
push eax
push str.WARNING:_Could_not_get_IP_address_from_interface_list:__s_n
call fcn.00404029
mov edx, dword [esp + 0x20]
pop ecx
pop ecx
mov byte [edx], 0
jmp 0x403495
mov edx, dword [esp + 0x18]
mov ecx, dword [ebp]
mov eax, dword [ebx]
mov dword [eax + ecx*4], edx
lea eax, [ecx + 1]
mov dword [ebp], eax
mov edi, dword [edi + 8]
test edi, edi
jne 0x403431
mov ebx, dword [esp + 0x20]
mov ebx, dword [ebx + 8]
test ebx, ebx
mov dword [esp + 0x20], ebx
jne 0x403418
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x4034cd
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebx, edx
lea ecx, [esp + 0x18]
push dword [edi + 0x10]
push dword [edi + 0x18]
call fcn.0040316e
pop ecx
pop ecx
push 6
xor ebp, ebp
inc ebp
push ebp
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x403533
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, esi
call fcn.00401d3a
cmp dword [edi + 4], 0x17
mov ecx, str.IPv6
push eax
mov eax, str.IPv4
cmovne ecx, eax
push ecx
push str.Warning:__s_error.__s_n
call fcn.00404029
add esp, 0xc
jmp 0x4035c9
cmp dword [edi + 4], 0x17
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [esp + 0x10], ebp
jne 0x403551
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1b
push 0x29
push eax
call esi
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebp
push eax
push 0xfffffffffffffffb
push 0xffff
push dword [ebx]
call esi
push dword [edi + 0x10]
push dword [edi + 0x18]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x40359f
push closesocket
push dword [ebx]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jne 0x40359f
lea eax, [esp + 0x18]
push eax
push str.Listening_on__s_n
call fcn.00404019
pop ecx
pop ecx
xor eax, eax
jmp 0x4035cb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, esi
call fcn.00401d3a
push eax
lea eax, [esp + 0x1c]
push eax
push str.Warning:__s:__s_n
call fcn.00404029
add esp, 0xc
push dword [ebx]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret

Function at 0x403643
Capabilities:
Get socket status

Disassembly:
sub esp, 0x104
push ebx
mov ebx, dword [0x40a998]
push ebp
xor ebp, ebp
mov eax, ebp
mov edx, ebp
mov dword [esp + 8], eax
push esi
mov esi, ebp
test ebx, ebx
jle 0x4036a5
push edi
mov edi, dword [0x40ab44]
mov ecx, ebp
test eax, eax
je 0x40367f
mov ebp, dword [edi + edx*4]
cmp dword [esp + ecx*4 + 0x14], ebp
je 0x40367d
inc ecx
cmp ecx, eax
jb 0x403672
xor ebp, ebp
cmp ecx, eax
jne 0x403698
cmp eax, 0x40
jae 0x403698
mov eax, dword [edi + edx*4]
mov dword [esp + ecx*4 + 0x14], eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp dword [edi + edx*4], esi
cmova esi, dword [edi + edx*4]
inc edx
cmp edx, ebx
jl 0x403669
pop edi
push ebp
push ebp
push ebp
lea eax, [esp + 0x18]
push eax
lea eax, [esi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x4036e6
cmp dword [0x40a998], 0
mov esi, ebp
jle 0x4036e6
lea eax, [esp + 0xc]
push eax
mov eax, dword [0x40ab44]
push dword [eax + esi*4]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x4036f3
inc esi
cmp esi, dword [0x40a998]
jl 0x4036c6
or eax, 0xffffffff
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
mov eax, dword [0x40ab44]
cmp dword [eax + esi*4], 0xffffffff
je 0x4036e6
push ebp
push ebp
push dword [eax + esi*4]
call dword [sym.imp.WS2_32.dll_accept]
jmp 0x4036e9
Function at 0x40370b
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc8
imul eax, dword [0x40a860], 0x3e8
push ebx
push ebp
push esi
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
mov ebp, 0xffff
push edi
push 4
mov dword [esp + 0x18], eax
mov edi, ecx
lea eax, [esp + 0x18]
mov ebx, edx
push eax
push 0x1006
push ebp
push edi
call esi
push 4
lea eax, [esp + 0x18]
push eax
push 0x1005
push ebp
push edi
call esi
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x5c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jne 0x403804
push dword [esp + 0x10]
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x20]
call fcn.0040316e
pop ecx
pop ecx
test al, al
je 0x403804
cmp word [esp + 0x58], 0x17
mov eax, str.IPv4
mov esi, str.IPv6
mov ebp, str._s_connection__s:__s._n
cmovne esi, eax
lea eax, [esp + 0x18]
push eax
push str.accepted
push esi
push ebp
call fcn.00404019
add esp, 0x10
test byte [0x40a994], 2
je 0x4037e1
xor edx, edx
lea ecx, [esp + 0x58]
call fcn.0040327a
test al, al
jne 0x4037e1
push str.Client_with_public_IP_address_rejected_n
call fcn.00404019
jmp 0x4037ef
lea eax, [esp + 0x18]
mov edx, ebx
push eax
mov ecx, edi
call fcn.004047d9
pop ecx
lea eax, [esp + 0x18]
push eax
push str.closed
push esi
push ebp
call fcn.00404019
add esp, 0x10
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40385b
Capabilities:
Create thread

Disassembly:
push ebx
push esi
push edi
push 8
mov edi, edx
mov ebx, ecx
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x403878
call fcn.00401dca
mov esi, eax
cmp byte [0x40a976], 0
mov dword [esi], ebx
mov dword [esi + 4], edi
jne 0x4038a0
cmp dword [0x40a864], 0x7fffffff
je 0x4038a0
push 0xffffffffffffffff
push dword [0x40ab40]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor edi, edi
push edi
push edi
push esi
push 0x403839
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4038bf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4038dc
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
call fcn.00403813
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x403a22
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov eax, ecx
xor ebx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 8], ebx
push esi
push edi
mov edi, edx
test eax, eax
jne 0x403a46
push 4
pop eax
call fcn.00401040
mov dword [ebp - 4], esp
test edi, edi
jne 0x403a5b
push 4
pop eax
call fcn.00401040
mov edi, esp
mov dword [ebp - 8], 1
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [edi], eax
test eax, eax
jne 0x403a75
xor al, al
jmp 0x403b04
push 0xf01ff
push str.vlmcsd
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x403a90
mov bl, 2
jmp 0x403af4
mov eax, dword [ebp - 4]
mov dword [eax], 1
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x403ab0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x20]
mov dword [ecx], eax
lea eax, [ebp - 0x24]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x20], 1
je 0x403add
inc bl
cmp bl, 0xa
jb 0x403abd
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
neg ebx
push esi
sbb bl, bl
and bl, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 8], 0
je 0x403b02
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, bl
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret