joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404440
Capabilities:
Check mutex on windows
Send data
Send data on socket

Disassembly:
sub esp, 0x424
push ebx
mov ebx, dword [esp + 0x434]
push ebp
push esi
xor esi, esi
cmp ebx, 0x400
lea eax, [ebx + 8]
lea ebp, [esp + 0x28]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], eax
jle 0x40448b
push eax
call fcn.0040e365
mov ebp, eax
add esp, 4
cmp ebp, esi
jne 0x40448b
pop esi
pop ebp
mov eax, 0xfffffff5
pop ebx
add esp, 0x424
ret
mov esi, dword [esp + 0x438]
mov ecx, ebx
shr ecx, 0x10
mov byte [ebp + 5], cl
mov eax, ebx
shr eax, 0x18
mov byte [ebp + 4], al
mov ecx, ebx
mov eax, ecx
push edi
mov edx, ebx
shr ecx, 2
shr edx, 8
mov byte [ebp + 7], bl
mov ebx, dword [esp + 0x1c]
mov byte [ebp], 0x4a
mov byte [ebp + 1], 0x5e
mov byte [ebp + 2], 0x7a
mov byte [ebp + 3], 4
mov byte [ebp + 6], dl
lea edi, [ebp + 8]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
cmp ebx, edi
mov dword [esp + 0x10], edi
mov esi, 0x40000000
jle 0x4045a9
mov eax, ebx
sub eax, edi
cmp eax, esi
jle 0x4044f2
mov eax, esi
mov edx, dword [esp + 0x438]
push 0
push eax
lea ecx, [edi + ebp]
push ecx
push edx
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x40456b
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2747
jne 0x404542
sar esi, 1
cmp esi, 0x400000
jle 0x404530
mov esi, 0x400000
mov dword [esp + 0x14], 0
jmp 0x404597
cmp esi, 0x100
jl 0x404561
mov dword [esp + 0x14], 0
jmp 0x404597
cmp eax, 0x2733
jne 0x404561
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x12c
mov dword [esp + 0x14], eax
jle 0x404597
mov dword [esp + 0x10], 0xfffffff4
jmp 0x4045a9
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x14], ecx
jne 0x40458f
push 0x1e
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 0x3e8
mov dword [esp + 0x18], eax
jg 0x404561
jmp 0x404597
jle 0x4045a1
add edi, eax
mov dword [esp + 0x18], ecx
cmp edi, ebx
jl 0x4044e8
jmp 0x4045a9
mov dword [esp + 0x10], 0xffffff9d
lea eax, [esp + 0x2c]
cmp ebp, eax
je 0x4045ba
push ebp
call fcn.0040e24d
add esp, 4
test edi, edi
jle 0x404642
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
push str.KASC_STAT_MUTEX
push ecx
lea edx, [esp + 0x28]
mov dword [esp + 0x30], ecx
push edx
mov dword [esp + 0x2c], 0xc
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], 1
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
je 0x40460b
push 0x3a98
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebp, eax
jmp 0x40460f
mov ebp, dword [esp + 0x1c]
mov ebx, 0x4214f0
mov eax, 0x4214c0
call fcn.00404010
mov ecx, dword [0x4214c0]
add ecx, edi
test esi, esi
mov dword [0x4214c0], ecx
je 0x404642
test ebp, ebp
jne 0x40463b
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x424
ret
Function at 0x404d50
Capabilities:
Delete registry key

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0xf003f
push 0
push str.SOFTWARERAdmin_v3.0ServerParametersRadmin_Security
push 0x80000002
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404d87
mov ecx, dword [esp]
push 0x41b2f0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov eax, dword [esp]
test eax, eax
je 0x404d95
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x421b28]
test eax, eax
je 0x404dc8
push 4
push 0x421b30
push 3
push str.NTAuthEnabled
push str.SOFTWARERAdmin_v3.0ServerParameters
push 0x80000002
mov dword [0x421b28], 0
call fcn.00409850
add esp, 0x18
mov eax, dword [0x421b2c]
test eax, eax
je 0x404dfb
push 4
push 0x4200c8
push 3
push str.Port
push str.SOFTWARERAdmin_v3.0ServerParameters
push 0x80000002
mov dword [0x421b2c], 0
call fcn.00409850
add esp, 0x18
xor eax, eax
pop ecx
ret
Function at 0x405e90
Capabilities:
Enumerate gui resources

Disassembly:
sub esp, 0xc
mov ecx, dword [esp + 0x10]
lea eax, [esp + 4]
push ecx
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
call fcn.00405bd0
add esp, 4
cmp eax, 0xffffffec
mov dword [esp + 4], eax
jl 0x405ece
test eax, eax
jg 0x405ece
mov eax, 1
add esp, 0xc
ret
push esi
push edi
lea edx, [esp + 8]
push edx
push 0x405630
call dword [sym.imp.USER32.dll_EnumWindows]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
test eax, eax
mov eax, dword [esp + 0x10]
je 0x405f06
xor esi, esi
test eax, eax
jne 0x405f06
cmp esi, 0x19
jge 0x405f06
push 0xa
call edi
mov eax, dword [esp + 0x10]
inc esi
test eax, eax
je 0x405ef4
test eax, eax
mov ecx, dword [esp + 0x1c]
mov dword [ecx], eax
jne 0x405f26
push 0x1f4
mov dword [esp + 0xc], eax
call edi
pop edi
mov eax, 2
pop esi
add esp, 0xc
ret
pop edi
xor eax, eax
pop esi
add esp, 0xc
ret

Function at 0x405f30
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x11c
push ebx
push esi
xor ebx, ebx
push edi
xor eax, eax
mov ecx, 0x42
lea edi, [esp + 0x19]
mov byte [esp + 0x18], bl
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
cmp eax, ebx
mov dword [esp + 0x14], ebx
je 0x406097
cmp byte [eax], 0
je 0x406097
push 0x104
push eax
lea eax, [esp + 0x20]
push eax
call fcn.0040da90
lea eax, [esp + 0x24]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405f84
sub eax, edx
mov cl, byte [esp + eax + 0x14]
cmp cl, 0x2e
lea eax, [esp + eax + 0x18]
jne 0x405fb9
mov cl, byte [eax - 3]
or cl, 0x20
cmp cl, 0x65
jne 0x405fb9
mov dl, byte [eax - 2]
or dl, 0x20
cmp dl, 0x78
jne 0x405fb9
mov al, byte [eax - 1]
or al, 0x20
cmp al, cl
je 0x405fd9
lea edi, [esp + 0x18]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405fc0
mov ecx, dword [str..exe]
mov dl, byte [0x41b624]
mov dword [edi], ecx
mov byte [edi + 4], dl
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.00405e90
add esp, 8
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x406050
mov esi, dword [esp + 0x14]
mov edi, dword [sym.imp.USER32.dll_PostMessageA]
push ebx
push 0xf060
push 0x112
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x32
call ebx
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40602d
push 0
push 0
push 0x10
push esi
call edi
push 0x32
call ebx
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40608c
push 0
push 0
push 2
push esi
call edi
push 0x32
call ebx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x40608c
lea edx, [esp + 0x18]
push edx
call fcn.00405bd0
add esp, 4
cmp eax, ebx
jbe 0x40608c
push eax
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, ebx
je 0x40608c
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406150
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, 0x1000
call fcn.0040de90
push esi
mov esi, dword [esp + 0x100c]
cmp esi, 0xffffffff
jne 0x406171
or eax, esi
pop esi
add esp, 0x1000
ret
push ebx
mov ebx, dword [esp + 0x100c]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx]
push ebp
push edi
mov edi, dword [ebx + 4]
add eax, edi
cmp eax, ecx
jle 0x4061eb
cmp edi, 0x1000
jbe 0x406201
push edi
call fcn.0040e365
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4061e4
mov eax, dword [ebx + 8]
mov ecx, dword [ebx]
mov esi, dword [ebx + 0xc]
sub ecx, eax
mov edx, ecx
shr ecx, 2
add esi, eax
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov esi, dword [ebx + 0xc]
sub ecx, edi
add ecx, eax
sub edi, eax
mov eax, ecx
shr ecx, 2
add edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1018]
test ebp, ebp
mov edi, dword [ebx + 4]
jne 0x406207
mov ecx, dword [ebx + 0xc]
mov ebp, dword [ebx + 8]
push 0
push edi
add ecx, ebp
push ecx
push esi
call sub.WS2_32.dll_send
mov esi, eax
jmp 0x406224
lea ebp, [esp + 0x10]
jmp 0x4061a0
push 0
push edi
push ebp
push esi
call sub.WS2_32.dll_send
lea edx, [esp + 0x10]
cmp ebp, edx
mov esi, eax
je 0x406224
push ebp
call fcn.0040e24d
add esp, 4
cmp esi, 0xffffffff
je 0x406250
mov eax, dword [ebx + 8]
add eax, esi
cdq
idiv dword [ebx]
mov ebp, dword [ebx + 4]
mov ecx, dword [ebx + 0x10]
sub ebp, esi
add ecx, esi
cmp esi, edi
mov dword [ebx + 4], ebp
mov dword [ebx + 0x10], ecx
mov dword [ebx + 8], edx
jge 0x406250
sub edi, esi
mov dword [ebx + 0x20], edi
mov dword [ebx + 0x24], edx
pop edi
pop ebp
pop ebx
mov eax, esi
pop esi
add esp, 0x1000
ret

Function at 0x406930
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x1a4
push esi
mov esi, dword [esp + 0x1ac]
xor eax, eax
test esi, esi
je 0x4069f3
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0xb]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x11]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1a]
push edx
lea eax, [esp + 0x28]
push eax
push str._d_c_d_c_d_c_d
push esi
call fcn.0040e737
add esp, 0x24
cmp eax, 7
jl 0x4069a5
mov cl, byte [esp + 6]
mov al, 0x2e
cmp cl, al
jne 0x4069a5
cmp byte [esp + 5], al
jne 0x4069a5
cmp byte [esp + 7], al
jne 0x4069a5
push esi
call fcn.004188f9
add esp, 4
pop esi
add esp, 0x1a4
ret
push edi
lea ecx, [esp + 0x1c]
push ecx
push 0x101
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4069e9
push esi
call sub.WS2_32.dll_gethostbyname
mov edi, eax
call fcn.0040d8de
test edi, edi
je 0x4069e9
mov edx, dword [edi + 0xc]
mov eax, dword [edx]
mov eax, dword [eax]
push eax
call sub.WS2_32.dll_inet_ntoa
push eax
call fcn.004188f9
add esp, 4
pop edi
pop esi
add esp, 0x1a4
ret
push esi
call fcn.004188f9
add esp, 4
pop edi
pop esi
add esp, 0x1a4
ret
Function at 0x406b70
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x124
xor eax, eax
mov dword [esp + 5], eax
push esi
lea ecx, [esp + 8]
mov dword [esp + 0xd], eax
mov dword [esp + 0x11], eax
push ecx
push 0x4d000001
xor esi, esi
mov byte [esp + 0x10], 0
mov dword [esp + 0x1d], eax
mov dword [esp + 0xc], eax
call fcn.00404af0
lea edx, [esp + 0x18]
push edx
push 1
call fcn.00404af0
mov ecx, dword [esp + 0x140]
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.00404af0
add esp, 0x18
push 0xff
lea edx, [esp + 0x2c]
push edx
call sub.WS2_32.dll_gethostname
test eax, eax
jne 0x406d1e
lea eax, [esp + 0x28]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x406bf0
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov esi, dword [edx]
lea eax, [esp + 0x14]
push eax
push esi
call fcn.00404af0
mov edx, dword [esp + 0x134]
push 0x11
lea ecx, [esp + 0x14]
push ecx
push edx
mov byte [esp + 0x2c], 2
call fcn.00404440
add esp, 0x14
test eax, eax
je 0x406c28
mov eax, 0xe40001
pop esi
add esp, 0x124
ret
push ebx
push ebp
lea eax, [esp + 0x24]
push edi
push eax
or ebx, 0xffffffff
call fcn.0040dc0c
add esp, 4
xor ebp, ebp
lea ecx, [ecx]
mov esi, dword [esp + 0x140]
mov eax, dword [esp + 0x138]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x14]
push edx
push esi
push eax
call fcn.00404660
add esp, 0x10
test eax, eax
jne 0x406ce5
mov esi, dword [esp + 0x10]
push esi
call fcn.00404ac0
add esp, 4
cmp eax, 0x4d000003
jne 0x406cc3
lea ecx, [esi + 4]
push ecx
call fcn.00404ac0
add esi, 8
push esi
mov edi, eax
call fcn.00404ac0
mov ecx, dword [esp + 0x144]
add esp, 8
cmp edi, ecx
jne 0x406cc3
cmp eax, 0x1000f
jne 0x406caa
mov ebx, 1
jmp 0x406cbe
cmp eax, 0x10001
jne 0x406cb5
xor ebx, ebx
jmp 0x406cbe
cmp eax, 0x2bad2bad
jne 0x406cc3
mov ebx, eax
mov ebp, 1
mov edx, dword [esp + 0x10]
push edx
call fcn.00404a80
add esp, 4
test ebp, ebp
je 0x406c40
pop edi
pop ebp
mov eax, ebx
pop ebx
pop esi
add esp, 0x124
ret
cmp eax, 0xfffffff4
je 0x406cd8
cmp eax, 0xfffffff5
je 0x406cd8
cmp eax, 0xffffff9d
je 0x406cd8
lea eax, [esp + 0x2c]
push eax
call fcn.0040dc0c
mov ecx, dword [esp + 0x30]
sub ecx, dword [esp + 0x2c]
add esp, 4
cmp ecx, esi
jle 0x406c40
pop edi
pop ebp
mov eax, ebx
pop ebx
pop esi
add esp, 0x124
ret
or eax, 0xffffffff
pop esi
add esp, 0x124
ret
Function at 0x406d30
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x124
xor eax, eax
mov dword [esp + 5], eax
push esi
lea ecx, [esp + 8]
mov dword [esp + 0xd], eax
mov dword [esp + 0x11], eax
push ecx
push 0x4d000001
xor esi, esi
mov byte [esp + 0x10], 0
mov dword [esp + 0x1d], eax
mov dword [esp + 0xc], eax
call fcn.00404af0
lea edx, [esp + 0x18]
push edx
push 1
call fcn.00404af0
mov ecx, dword [esp + 0x140]
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.00404af0
add esp, 0x18
push 0xff
lea edx, [esp + 0x2c]
push edx
call sub.WS2_32.dll_gethostname
test eax, eax
jne 0x406ed0
lea eax, [esp + 0x28]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x406db0
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov esi, dword [edx]
lea eax, [esp + 0x14]
push eax
push esi
call fcn.00404af0
mov edx, dword [esp + 0x134]
push 0x11
lea ecx, [esp + 0x14]
push ecx
push edx
mov byte [esp + 0x2c], 1
call fcn.00404440
add esp, 0x14
test eax, eax
je 0x406de8
mov eax, 0xe40001
pop esi
add esp, 0x124
ret
push ebx
push ebp
lea eax, [esp + 0x24]
push edi
push eax
or ebx, 0xffffffff
call fcn.0040dc0c
add esp, 4
xor ebp, ebp
lea ecx, [ecx]
mov esi, dword [esp + 0x140]
mov eax, dword [esp + 0x138]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x14]
push edx
push esi
push eax
call fcn.00404660
add esp, 0x10
test eax, eax
jne 0x406e97
mov esi, dword [esp + 0x10]
push esi
call fcn.00404ac0
add esp, 4
cmp eax, 0x4d000003
jne 0x406e75
lea ecx, [esi + 4]
push ecx
call fcn.00404ac0
add esi, 8
push esi
mov edi, eax
call fcn.00404ac0
mov ecx, dword [esp + 0x144]
add esp, 8
cmp edi, ecx
jne 0x406e75
cmp eax, 0x10000
jne 0x406e67
xor ebx, ebx
jmp 0x406e70
cmp eax, 0x2bad2bad
jne 0x406e75
mov ebx, eax
mov ebp, 1
mov edx, dword [esp + 0x10]
push edx
call fcn.00404a80
add esp, 4
test ebp, ebp
je 0x406e00
pop edi
pop ebp
mov eax, ebx
pop ebx
pop esi
add esp, 0x124
ret
cmp eax, 0xfffffff4
je 0x406e8a
cmp eax, 0xfffffff5
je 0x406e8a
cmp eax, 0xffffff9d
je 0x406e8a
lea eax, [esp + 0x2c]
push eax
call fcn.0040dc0c
mov ecx, dword [esp + 0x30]
sub ecx, dword [esp + 0x2c]
add esp, 4
cmp ecx, esi
jle 0x406e00
pop edi
pop ebp
mov eax, ebx
pop ebx
pop esi
add esp, 0x124
ret
or eax, 0xffffffff
pop esi
add esp, 0x124
ret
Function at 0x406ee0
Capabilities:
Connect socket
Get socket status
Initialize winsock library
Set socket configuration

Disassembly:
sub esp, 0x2b0
mov eax, dword [esp + 0x2b4]
push ebx
push ebp
mov ebp, 1
xor ebx, ebx
test eax, eax
mov dword [esp + 8], ebp
je 0x407056
cmp byte [eax], 0
je 0x407056
push esi
push edi
push eax
call sub.WS2_32.dll_inet_addr
push ebx
push ebp
push 2
mov edi, eax
call sub.WS2_32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x406f5d
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x276d
jne 0x406fc3
lea eax, [esp + 0x130]
push eax
push 0x101
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x406fc3
push eax
push ebp
push 2
call sub.WS2_32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
je 0x406fbe
mov ebx, ebp
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push esi
mov dword [esp + 0x1c], ebp
call sub.WS2_32.dll_ioctlsocket
mov edx, dword [esp + 0x2c8]
push edx
mov word [esp + 0x20], 2
mov dword [esp + 0x24], edi
call sub.WS2_32.dll_htons
mov word [esp + 0x1e], ax
push 0x10
lea eax, [esp + 0x20]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x406fd1
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x406fd1
push 2
push esi
call sub.WS2_32.dll_shutdown
push esi
call sub.WS2_32.dll_closesocket
test ebx, ebx
je 0x406fc3
call fcn.0040d8de
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x2b0
ret
mov eax, dword [esp + 0x2cc]
xor ecx, ecx
cmp eax, ebp
mov dword [esp + 0x14], ecx
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
jge 0x406ff6
mov dword [esp + 0x14], ebp
lea edx, [esp + 0x14]
push edx
push 0
lea eax, [esp + 0x34]
push eax
push 0
push 0
call sub.WS2_32.dll_select
push 2
push esi
mov edi, eax
call sub.WS2_32.dll_shutdown
push esi
call sub.WS2_32.dll_closesocket
test ebx, ebx
je 0x407024
call fcn.0040d8de
cmp edi, 0xffffffff
je 0x406fc3
lea ecx, [esp + 0x2c]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x407049
test edi, edi
jle 0x407049
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x2b0
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2b0
ret
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x2b0
ret
Function at 0x408820
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x8c
push esi
push edi
mov ecx, 0xb
mov esi, str.SystemCurrentControlSetServicesVxDKaseya
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 8]
push eax
push 0x20019
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x80000002
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40892a
mov eax, dword [0x41b6f8]
mov ecx, dword [0x41b6fc]
mov edx, dword [str.ConfigurationFile]
mov esi, dword [esp + 0x98]
mov dword [esp + 0x18], eax
mov ax, word [0x41b704]
mov dword [esp + 0x1c], ecx
mov word [esp + 0x24], ax
mov dword [esp + 0x14], edx
mov edx, dword [0x41b700]
xor eax, eax
mov ecx, 0x41
mov edi, esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0xc]
push esi
mov dword [esp + 0x28], edx
lea edx, [esp + 0x18]
push edx
stosb byte es:[edi], al
push 0
lea eax, [esp + 0x24]
push eax
push ecx
mov dword [esp + 0x24], 0x105
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 8]
push edx
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x4088fe
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088f0
sub eax, edx
cmp eax, 1
jae 0x408954
mov eax, dword [str..kaseyad.ini]
mov dword [esi], eax
mov ecx, dword [0x41b6e8]
mov dword [esi + 4], ecx
mov edx, dword [0x41b6ec]
mov dword [esi + 8], edx
mov ax, word [0x41b6f0]
pop edi
mov word [esi + 0xc], ax
pop esi
add esp, 0x8c
ret
mov edx, dword [str..kaseyad.ini]
mov ecx, dword [esp + 0x98]
mov dword [ecx], edx
mov eax, dword [0x41b6e8]
mov dword [ecx + 4], eax
mov edx, dword [0x41b6ec]
mov dword [ecx + 8], edx
mov ax, word [0x41b6f0]
mov word [ecx + 0xc], ax
pop edi
pop esi
add esp, 0x8c
ret
Function at 0x409430
Capabilities:
Query environment variable

Disassembly:
push ebx
mov ebx, dword [esp + 8]
test ebx, ebx
push esi
push edi
je 0x4094e6
mov edi, dword [esp + 0x14]
test edi, edi
je 0x4094e6
mov esi, dword [esp + 0x18]
cmp esi, 1
jl 0x4094e6
push 0x25
push ebx
call fcn.0040e3c0
add esp, 8
test eax, eax
je 0x4094b2
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
jle 0x4094a5
cmp eax, esi
jg 0x4094a9
push 0x25
push edi
call fcn.0040e3c0
add esp, 8
test eax, eax
je 0x40949f
push esi
push edi
call fcn.00409020
add esp, 8
xor ecx, ecx
test eax, eax
setge cl
pop edi
pop esi
pop ebx
dec ecx
mov eax, ecx
ret
pop edi
pop esi
xor eax, eax
pop ebx
ret
cmp eax, esi
jle 0x4094e6
pop edi
pop esi
mov eax, 1
pop ebx
ret
lea edx, [esi - 1]
push edx
push ebx
push edi
call fcn.0040da90
mov eax, ebx
add esp, 0xc
mov byte [edi + esi - 1], 0
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4094d0
sub eax, edx
xor ecx, ecx
cmp eax, esi
setge cl
pop edi
pop esi
pop ebx
mov eax, ecx
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
ret
Function at 0x409850
Capabilities:
Set registry value

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 0x10]
lea ecx, [esp + 4]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push edx
push eax
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4098c3
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push esi
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0xc]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
neg eax
sbb eax, eax
and eax, 0xfffffffe
pop esi
add esp, 8
ret
or eax, 0xffffffff
add esp, 8
ret

Function at 0x4098d0
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0x14]
test esi, esi
push edi
je 0x409931
cmp byte [esi], 0
je 0x409931
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push 0x20006
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40992a
mov eax, dword [esp + 0x18]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 0x18]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4099b3
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
ret
mov ebx, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push 0x20006
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
mov edi, dword [esp + 0x14]
jne 0x40996f
mov eax, dword [esp + 0x18]
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov ecx, dword [esp + 0x18]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4099b3
push str.shlwapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x4099aa
push str.SHDeleteKeyA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4099aa
push edi
push ebx
call eax
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
je 0x4099b3
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
ret
pop edi
pop esi
mov eax, 0xfffffffc
pop ebx
ret
pop edi
pop esi
xor eax, eax
pop ebx
ret