joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100dda50
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 0xc], esi
jbe 0x100dda98
push ebx
push edi
mov edi, dword [ecx + 8]
movzx eax, word [ecx]
mov edx, dword [ebp + 8]
mov ebx, eax
shr ebx, 8
xor bl, byte [esi + edx]
inc esi
movzx edx, bl
add dx, ax
movzx eax, word [ecx + 2]
movzx edx, dx
imul edx, eax
movzx eax, word [ecx + 4]
add dx, ax
movzx eax, bl
add edi, eax
mov word [ecx], dx
mov dword [ecx + 8], edi
cmp esi, dword [ebp + 0xc]
jb 0x100dda60
pop edi
pop ebx
pop esi
pop ebp
ret 8

Function at 0x100ddf40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, 0x58bf
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0xce6dd971
mov word [ebp - 0x14], ax
push edi
test esi, esi
je 0x100ddf71
test ebx, ebx
jne 0x100ddf85
push 0x44
push str.C:Usersw9263DesktopFormDX_PrivateFormDXSAMPRakNetDataBlockEncryptor.cpp
push str.input__inputLength
call fcn.10063b16
add esp, 0xc
call fcn.100ebb50
lea ecx, [ebx + 5]
mov byte [ebp + 0xb], al
and cl, 0xf
mov bl, 0xf
sub bl, cl
call fcn.100ebb50
shl al, 4
or al, bl
movzx edi, bl
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
push ebx
lea ecx, [ebx + 6]
add ecx, edi
mov dword [eax], ecx
mov ecx, dword [ebp + 0x10]
push esi
lea eax, [ecx + 6]
add eax, edi
push eax
cmp esi, ecx
jne 0x100ddfca
call fcn.100563e0
jmp 0x100ddfcf
call fcn.100563e0
mov eax, dword [ebp + 0x10]
add esp, 0xc
mov dl, byte [ebp + 0xb]
lea ecx, [eax + 4]
mov dword [ebp - 0xc], ecx
xor esi, esi
mov byte [ecx], dl
mov ecx, dword [ebp - 8]
mov byte [eax + 5], cl
test edi, edi
je 0x100de001
add eax, 6
mov ebx, eax
call fcn.100ebb50
mov byte [ebx + esi], al
inc esi
cmp esi, edi
jb 0x100ddff1
mov ebx, dword [ebp + 0xc]
lea eax, [edi + 2]
add eax, ebx
lea ecx, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
call fcn.100dda50
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
push ecx
push ecx
mov dword [ecx], eax
push ecx
lea ecx, [edx + 0x240]
call fcn.100f18b0
mov eax, dword [ebp + 0x14]
add esp, 0xc
xor edi, edi
mov esi, dword [eax]
sub esi, 0x10
mov dword [ebp + 0xc], esi
cmp esi, 0x10
jb 0x100de0a9
mov eax, dword [ebp + 0x10]
lea ebx, [esi + eax]
lea edx, [eax + 3]
add edx, edi
lea eax, [ebx + 1]
sub edi, esi
mov esi, 4
movzx ecx, byte [edx - 3]
lea edx, [edx + 4]
xor byte [eax - 1], cl
lea eax, [eax + 4]
movzx ecx, byte [edi + eax - 4]
xor byte [eax - 4], cl
movzx ecx, byte [edx - 5]
xor byte [eax - 3], cl
movzx ecx, byte [edx - 4]
xor byte [eax - 2], cl
sub esi, 1
jne 0x100de055
push ebx
push ecx
mov ecx, dword [ebp - 4]
mov edx, ecx
push ebx
lea ecx, [ecx + 0x240]
call fcn.100f18b0
mov esi, dword [ebp + 0xc]
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov edi, esi
sub esi, 0x10
sub ebx, 0x10
mov dword [ebp + 0xc], esi
cmp esi, 0x10
jae 0x100de046
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x100ebb50
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x1015a2f4]
add eax, 0xffffffff
mov dword [0x1015a2f4], eax
jns 0x100ebc84
push ebx
push esi
mov esi, 0x1017d308
push edi
mov edi, 0x1017d300
cmp eax, 0xffffffff
jge 0x100ebb83
mov ecx, 0x1105
call fcn.100ebb10
mov eax, dword [0x1017d300]
mov ebx, 0xe3
mov edx, dword [0x1017d304]
mov dword [0x1015a2f4], 0x26f
mov dword [0x1017dcc4], 0x1017d304
nop word [eax + eax]
mov ecx, edx
xor ecx, eax
and ecx, 0x7ffffffe
xor ecx, eax
mov eax, edx
and al, 1
shr ecx, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
mov eax, edx
xor ecx, dword [esi + 0x62c]
mov dword [edi], ecx
add edi, 4
mov edx, dword [esi]
add esi, 4
sub ebx, 1
jne 0x100ebbb0
mov ebx, 0x1017d300
mov dword [ebp - 4], 0x18c
mov ecx, edx
lea ebx, [ebx + 4]
xor ecx, eax
lea edi, [edi + 4]
and ecx, 0x7ffffffe
lea esi, [esi + 4]
xor ecx, eax
mov eax, edx
and al, 1
shr ecx, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
mov eax, edx
xor ecx, dword [ebx - 4]
sub dword [ebp - 4], 1
mov dword [edi - 4], ecx
mov edx, dword [esi - 4]
jne 0x100ebbf3
mov edx, dword [0x1017d300]
mov ecx, edx
xor ecx, eax
and ecx, 0x7ffffffe
xor ecx, eax
mov eax, edx
and al, 1
shr ecx, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
mov eax, edx
xor ecx, dword [ebx]
shr eax, 0xb
xor edx, eax
mov dword [edi], ecx
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
pop edi
mov eax, edx
shr eax, 0x12
pop esi
xor eax, edx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x1017dcc4]
mov ecx, dword [eax]
add eax, 4
mov dword [0x1017dcc4], eax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
mov esp, ebp
pop ebp
ret
Function at 0x100f14b0
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
lea eax, [ecx + 2]
mov edi, 4
nop word [eax + eax]
movzx ecx, byte [eax + 1]
lea eax, [eax + 4]
movzx edx, byte [eax - 5]
mov esi, dword [ecx*4 + 0x10150a40]
movzx ecx, byte [eax - 4]
xor esi, dword [edx*4 + 0x1014fe40]
xor esi, dword [ecx*4 + 0x1014ea40]
movzx ecx, byte [eax - 6]
xor esi, dword [ecx*4 + 0x10150640]
mov dword [eax - 6], esi
sub edi, 1
jne 0x100f14c0
pop edi
pop esi
ret
Function at 0x100f1500
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x1014d094]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov byte [ebp - 0x45], dl
mov dword [ebp - 0x4c], ebx
test ebx, ebx
jne 0x100f1532
lea eax, [ecx - 3]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10054437
mov esp, ebp
pop ebp
ret
test dl, dl
je 0x100f154d
cmp dl, 1
je 0x100f154d
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10054437
mov esp, ebp
pop ebp
ret
mov byte [ebx], dl
mov dword [ebx + 4], 0x80
test eax, eax
je 0x100f16e5
push esi
push edi
push 0x10
push eax
lea edi, [ebx + 8]
push edi
call fcn.10064b60
mov eax, dword [ebx + 4]
add esp, 0xc
cdq
xor esi, esi
and edx, 7
mov dword [0x1015b7fc], 0xa
add eax, edx
sar eax, 3
test eax, eax
jle 0x100f159c
nop dword [eax + eax]
mov cl, byte [edi + esi]
mov byte [ebp + esi - 0x44], cl
inc esi
cmp esi, eax
jl 0x100f1590
xor ecx, ecx
nop
mov eax, dword [ebp + ecx - 0x38]
mov dword [ebp + ecx - 0x18], eax
sub ecx, 4
cmp ecx, 0xfffffff4
jge 0x100f15a0
xor edi, edi
xor eax, eax
xor esi, esi
mov ebx, edi
mov dword [ebp - 0x50], ebx
cmp edi, 0xb
jge 0x100f16ae
cmp esi, 4
jge 0x100f15ea
mov ebx, dword [ebp - 0x4c]
nop dword [eax]
cmp eax, 4
jge 0x100f15e7
mov ecx, dword [ebp + esi*4 - 0x24]
lea edx, [eax + edi*4]
inc esi
mov dword [ebx + edx*4 + 0x30], ecx
inc eax
cmp esi, 4
jl 0x100f15d0
mov ebx, dword [ebp - 0x50]
mov ecx, eax
lea edi, [ebx + 1]
xor eax, eax
cmp ecx, 4
cmovne eax, ecx
cmovne edi, ebx
cmp esi, 4
jl 0x100f15b6
cmp edi, 0xb
jge 0x100f16ae
mov ebx, 0x10116dc0
nop dword [eax]
movzx ecx, byte [ebp - 0x16]
mov edx, dword [ebx]
add ebx, 4
mov dword [ebp - 0x50], ebx
movzx ecx, byte [ecx + str.cw]
xor byte [ebp - 0x23], cl
movzx ecx, byte [ebp - 0x15]
movzx ecx, byte [ecx + str.cw]
xor byte [ebp - 0x22], cl
movzx ecx, byte [ebp - 0x18]
movzx ecx, byte [ecx + str.cw]
xor byte [ebp - 0x21], cl
movzx ecx, byte [ebp - 0x17]
movzx ecx, byte [ecx + str.cw]
xor cl, dl
mov edx, 1
xor byte [ebp - 0x24], cl
mov ecx, dword [ebp + edx*4 - 0x28]
xor dword [ebp + edx*4 - 0x24], ecx
inc edx
cmp edx, 4
jl 0x100f1657
xor esi, esi
cmp edi, 0xb
jge 0x100f16ae
cmp esi, 4
jge 0x100f168e
mov ebx, dword [ebp - 0x4c]
cmp eax, 4
jge 0x100f168b
mov ecx, dword [ebp + esi*4 - 0x24]
lea edx, [eax + edi*4]
inc esi
mov dword [ebx + edx*4 + 0x30], ecx
inc eax
cmp esi, 4
jl 0x100f1674
mov ebx, dword [ebp - 0x50]
mov ecx, eax
lea edx, [edi + 1]
xor eax, eax
cmp ecx, 4
cmovne edx, edi
cmovne eax, ecx
mov edi, edx
cmp esi, 4
jl 0x100f1667
cmp edx, 0xb
jl 0x100f1610
cmp byte [ebp - 0x45], 1
jne 0x100f16cf
mov esi, dword [ebp - 0x4c]
mov edi, 9
add esi, 0x40
nop
mov ecx, esi
call fcn.100f14b0
add esi, 0x10
sub edi, 1
jne 0x100f16c0
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10054437
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xfffffffe
xor ecx, ebp
pop ebx
call fcn.10054437
mov esp, ebp
pop ebp
ret
Function at 0x100f1700
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor edx, edx
mov byte [ecx], 1
lea eax, [ecx + 1]
mov dword [ebp - 0xc], edx
push esi
mov dword [ebp - 0x10], eax
push edi
nop word [eax + eax]
mov eax, dword [0x1015a2f4]
add eax, 0xffffffff
mov dword [0x1015a2f4], eax
jns 0x100f1859
mov edi, 0x1017d300
mov esi, 0x1017d308
cmp eax, 0xffffffff
jge 0x100f174c
mov ecx, 0x1105
call fcn.100ebb10
mov ebx, dword [0x1017d300]
mov eax, dword [0x1017d304]
mov dword [0x1015a2f4], 0x26f
mov dword [0x1017dcc4], 0x1017d304
mov dword [ebp - 4], 0xe3
mov edx, eax
mov ecx, eax
xor edx, ebx
and cl, 1
and edx, 0x7ffffffe
movzx ecx, cl
xor edx, ebx
mov ebx, eax
shr edx, 1
neg ecx
sbb ecx, ecx
and ecx, 0x9908b0df
xor edx, ecx
xor edx, dword [esi + 0x62c]
mov dword [edi], edx
add edi, 4
mov eax, dword [esi]
add esi, 4
sub dword [ebp - 4], 1
jne 0x100f1772
mov dword [ebp - 4], 0x1017d300
mov dword [ebp - 8], 0x18c
nop word [eax + eax]
mov edx, eax
lea edi, [edi + 4]
xor edx, ebx
lea esi, [esi + 4]
and edx, 0x7ffffffe
mov ecx, eax
and cl, 1
xor edx, ebx
movzx ecx, cl
mov ebx, eax
shr edx, 1
neg ecx
sbb ecx, ecx
and ecx, 0x9908b0df
xor edx, ecx
mov ecx, dword [ebp - 4]
xor edx, dword [ecx]
add ecx, 4
sub dword [ebp - 8], 1
mov dword [edi - 4], edx
mov eax, dword [esi - 4]
mov dword [ebp - 4], ecx
jne 0x100f17c0
mov edx, dword [0x1017d300]
mov ecx, edx
xor ecx, ebx
mov eax, edx
and al, 1
and ecx, 0x7ffffffe
movzx eax, al
xor ecx, ebx
shr ecx, 1
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
mov eax, dword [ebp - 4]
xor ecx, dword [eax]
mov eax, edx
shr eax, 0xb
xor edx, eax
mov dword [edi], ecx
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
mov edx, dword [ebp - 0xc]
jmp 0x100f188e
mov eax, dword [0x1017dcc4]
mov ecx, dword [eax]
add eax, 4
mov dword [0x1017dcc4], eax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
mov ecx, dword [ebp - 0x10]
mov byte [ecx + edx], al
inc edx
mov dword [ebp - 0xc], edx
cmp edx, 0x10
jl 0x100f1720
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100f3670
Capabilities:
Encode data using xor
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [0x1014d094]
xor eax, esp
mov dword [esp + 0x10], eax
cmp dword [ebp + 8], 0xffffffff
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
jne 0x100f36aa
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.10054437
mov esp, ebp
pop ebp
ret 0x14
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0xe], ax
xor edi, edi
mov eax, dword [ebp + 0x14]
xor dl, dl
mov dword [esp + 0x10], eax
mov eax, 2
mov word [esp + 0xc], ax
xor eax, eax
test esi, esi
jle 0x100f375d
cmp esi, 0x20
jb 0x100f3750
movaps xmm3, xmmword [0x10141c70]
mov ecx, esi
and ecx, 0xffffffe0
xorps xmm2, xmm2
xorps xmm1, xmm1
nop
movups xmm0, xmmword [ebx + eax]
pand xmm0, xmm3
pxor xmm2, xmm0
movups xmm0, xmmword [ebx + eax + 0x10]
add eax, 0x20
pand xmm0, xmm3
pxor xmm1, xmm0
cmp eax, ecx
jl 0x100f36f0
pxor xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
pxor xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
pxor xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 2
pxor xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 1
pxor xmm1, xmm0
movd edx, xmm1
cmp eax, esi
jge 0x100f375d
nop dword [eax]
mov cl, byte [ebx + eax]
inc eax
and cl, 0xaa
xor dl, cl
cmp eax, esi
jl 0x100f3750
push esi
push ebx
push 0x1017b9b1
mov byte [0x1017b9b0], dl
call fcn.100563e0
add esp, 0xc
xor ecx, ecx
test esi, esi
jle 0x100f37a9
mov edx, dword [ebp + 0x18]
nop dword [eax + eax]
movzx eax, byte [ecx + 0x1017b9b1]
mov al, byte [eax + 0x10117040]
mov byte [ecx + 0x1017b9b1], al
test edi, edi
je 0x100f37a1
xor al, dl
xor al, 0xcc
mov byte [ecx + 0x1017b9b1], al
inc ecx
xor edi, 1
cmp ecx, esi
jl 0x100f3780
mov edi, dword [sym.imp.WS2_32.dll_sendto]
inc esi
mov ebx, dword [ebp + 8]
push 0x10
lea eax, [esp + 0x10]
push eax
push 0
push esi
push 0x1017b9b0
push ebx
call edi
test eax, eax
je 0x100f37b3
cmp eax, 0xffffffff
je 0x100f37e4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.10054437
mov esp, ebp
pop ebp
ret 0x14
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10054437
mov esp, ebp
pop ebp
ret 0x14
Function at 0x100f3800
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x1014d094]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x54]
push 0x50
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
je 0x100f3873
push ebx
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x100f3872
mov ecx, dword [ebx + 0xc]
cmp dword [ecx], 0
je 0x100f3872
push esi
xor esi, esi
cmp esi, 0x28
jge 0x100f3871
mov eax, dword [esi + ecx]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, edi
sub edx, eax
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x100f3855
mov ecx, dword [ebx + 0xc]
add esi, 4
add edi, 0x10
cmp dword [esi + ecx], 0
jne 0x100f3841
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.10054437
mov esp, ebp
pop ebp
ret 4
Function at 0x100f5f10
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [0x1017f1f8]
push ebx
push esi
xor ebx, ebx
xor esi, esi
mov dword [ebp - 4], ebx
test ecx, ecx
je 0x100f5fed
mov eax, dword [0x1017f1f0]
add eax, 0x14
test byte [eax], 2
je 0x100f5f4a
inc esi
add eax, 0x2c
cmp esi, ecx
jb 0x100f5f35
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
je 0x100f5fed
push edi
push 1
or edx, 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.100f60e0
mov ecx, dword [0x1017f1f8]
add esp, 4
cmp esi, ecx
jae 0x100f5f9b
imul edi, esi, 0x2c
mov eax, dword [0x1017f1f0]
test byte [edi + eax + 0x14], 2
jne 0x100f5f90
mov ecx, esi
call fcn.100f6000
mov ebx, eax
test ebx, ebx
jne 0x100f5f98
mov ecx, dword [0x1017f1f8]
inc esi
add edi, 0x2c
cmp esi, ecx
jb 0x100f5f71
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x100f5fec
xor esi, esi
cmp dword [ebp - 8], esi
jbe 0x100f5fdd
mov ebx, eax
nop dword [eax + eax]
push dword [ebx + esi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov edi, eax
test edi, edi
je 0x100f5fd1
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [ebp - 8]
jb 0x100f5fb0
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
push eax
push 0
push dword [0x1017c9ac]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x100f6000
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
imul esi, ecx, 0x2c
push edi
add esi, dword [0x1017f1f0]
mov eax, dword [esi]
mov cl, byte [esi + 0x14]
and cl, 1
lea edi, [eax - 5]
cmove edi, eax
movzx eax, cl
lea ebx, [eax*2 + 5]
lea eax, [ebp - 4]
push eax
push 0x40
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x100f6046
pop edi
pop esi
mov eax, 0xa
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [edi], 0xe9
mov eax, dword [esi + 4]
sub eax, edi
sub eax, 5
mov dword [edi + 1], eax
test byte [esi + 0x14], 1
je 0x100f6061
mov eax, dword [esi]
mov word [eax], 0xf9eb
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
or byte [esi + 0x14], 6
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100f60e0
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1014d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x24], edx
push edi
push 0
push 4
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
je 0x100f61da
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x100f61d3
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x20], 0x10
jb 0x100f61b9
call ebx
cmp dword [ebp - 0x14], eax
jne 0x100f61b9
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp - 0x18], eax
je 0x100f61b9
mov edx, dword [esi]
test edx, edx
jne 0x100f6182
push 0x200
push edx
push dword [0x1017c9ac]
mov dword [esi + 4], 0x80
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esi], edx
test edx, edx
je 0x100f61d3
jmp 0x100f61ad
mov eax, dword [esi + 4]
cmp dword [esi + 8], eax
jb 0x100f61ad
shl eax, 3
push eax
push edx
push 0
push dword [0x1017c9ac]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
test edx, edx
je 0x100f61d3
mov eax, dword [esi + 4]
add eax, eax
mov dword [esi], edx
mov dword [esi + 4], eax
mov ecx, dword [esi + 8]
mov eax, dword [ebp - 0x18]
mov dword [edx + ecx*4], eax
inc dword [esi + 8]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x100f6141
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi], 0
je 0x100f621f
xor edi, edi
cmp dword [esi + 8], edi
jbe 0x100f621f
mov eax, dword [esi]
push dword [eax + edi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x100f6219
push ebx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push dword [ebp + 8]
mov edx, dword [ebp - 0x24]
mov ecx, ebx
call fcn.100f6330
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [esi + 8]
jb 0x100f61e6
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10054437
mov esp, ebp
pop ebp
ret
Function at 0x1000678b
Capabilities:
Encode data using xor

Disassembly:
inc edi
and dword [ecx + 0x407f2f26], ecx
rcl ebx, 1
adc al, 0x77
inc edi
mov bh, 0x10
sbb esp, edx
sbb eax, 0xdbd56629
and ah, byte [ebx]
loope 0x100067ab
sub eax, 0xf15bec8d
movsd dword es:[edi], dword [esi]
invalid

Function at 0x430004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
call 0x43000c
nop
nop
nop
nop
pop eax
nop
add eax, 0x403daa
nop
nop
sub eax, 0x403d50
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
nop
add ebx, 4
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x430030
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x43001e
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp loc.00401219
Function at 0x402a5c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404760
test esi, esi
jne 0x402a92
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404850
jmp 0x402ab0
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402970
mov edi, eax
test esi, esi
je 0x402ab0
cmp dword [ebx], 0
je 0x402ab0
dec esi
jmp 0x402a99
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x403840
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x481020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4038d8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4038b8
xor eax, eax
push ebp
push 0x4038b1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4038f4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4038b8
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x481020]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x481020], ax
mov esp, ebp
pop ebp
ret

Function at 0x4045e4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x48604c], 0
je 0x404645
cmp word [0x486220], 0xd7b2
jne 0x40460d
cmp dword [0x486228], 0
jbe 0x40460d
mov eax, 0x48621c
call dword [0x486238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x481070
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40466c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x481030], 0
jne 0x404661
push 0
push 0x481068
push 0x481070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret