joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001c2c
Capabilities:
Allocate or change rwx memory
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
cmp esi, 0x7ff80000
mov ebx, 0x10000
jbe 0x10001c50
lea eax, [esi - 0x7ff80000]
mov dword [ebp + 8], eax
jmp 0x10001c53
mov dword [ebp + 8], ebx
cmp esi, 0x80000000
jae 0x10001c66
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x10001c6d
mov dword [ebp - 4], 0xfff80000
mov eax, dword [0x102b5a78]
mov ecx, dword [0x102b5a74]
test eax, eax
jne 0x10001c87
test ecx, ecx
je 0x10001c9c
mov eax, ecx
mov dword [0x102b5a78], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x10001c9c
cmp edx, dword [ebp + 8]
jb 0x10001c9c
cmp edx, dword [ebp - 4]
jbe 0x10001df5
mov eax, ecx
test ecx, ecx
mov dword [0x102b5a78], eax
je 0x10001ccc
test eax, eax
je 0x10001cc0
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x10001cc0
cmp ecx, dword [ebp + 8]
jb 0x10001cc0
cmp ecx, dword [ebp - 4]
jbe 0x10001df5
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x102b5a78], eax
jne 0x10001cab
mov eax, esi
and eax, 0xffff
sub esi, eax
cmp esi, dword [ebp + 8]
mov edi, esi
jbe 0x10001d34
cmp edi, 0x70000000
jb 0x10001cf1
cmp edi, 0x80000000
ja 0x10001cf1
mov edi, 0x6fff0000
lea eax, [ebp - 0x20]
push 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10001d34
cmp dword [ebp - 0x10], ebx
jne 0x10001d0c
cmp dword [ebp - 0x14], ebx
jae 0x10001d1c
mov eax, dword [ebp - 0x1c]
lea edi, [eax - 0x10000]
cmp edi, dword [ebp + 8]
ja 0x10001cdc
jmp 0x10001d34
push 0x40
push 0x3000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x102b5a78], eax
jne 0x10001dab
cmp esi, dword [ebp - 4]
jae 0x10001e1c
cmp esi, 0x70000000
jb 0x10001d52
cmp esi, 0x80000000
ja 0x10001d52
mov esi, 0x80010000
lea eax, [ebp - 0x20]
push 0x1c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10001e1c
cmp dword [ebp - 0x10], ebx
jne 0x10001da0
cmp dword [ebp - 0x14], ebx
jb 0x10001da0
mov ecx, esi
and ecx, 0xffff
je 0x10001d88
mov eax, ebx
sub eax, ecx
sub dword [ebp - 0x14], eax
add dword [ebp - 0x20], eax
mov esi, dword [ebp - 0x20]
push 0x40
push 0x3000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x102b5a78], eax
jne 0x10001dab
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
lea esi, [eax + ecx]
jmp 0x10001d34
mov dword [eax], 0x52727464
mov eax, dword [0x102b5a78]
xor ecx, ecx
mov dword [eax + 8], ecx
mov eax, dword [0x102b5a78]
mov edx, dword [0x102b5a74]
mov dword [eax + 4], edx
mov eax, dword [0x102b5a78]
mov dword [0x102b5a74], eax
add eax, 0xffe0
mov edx, 0x7fd
mov dword [eax + 0x18], ecx
mov ecx, eax
sub eax, 0x20
dec edx
jne 0x10001ddd
mov eax, dword [0x102b5a78]
mov dword [eax + 8], ecx
mov eax, dword [0x102b5a78]
mov esi, dword [eax + 8]
cmp esi, dword [ebp + 8]
jb 0x10001e1c
cmp esi, dword [ebp - 4]
ja 0x10001e1c
mov ecx, dword [esi + 0x18]
push 0x20
push 0xcc
push esi
mov dword [eax + 8], ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, esi
jmp 0x10001e1e
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10001e23
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002f2f0
push 0x10026222
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10001e98
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x34]
cmp word [ecx], 0x5a4d
jne 0x10001e94
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
jne 0x10001e94
cmp word [eax + 0x14], 0
jne 0x10001e89
xor eax, eax
or dword [ebp - 4], 0xffffffff
jmp 0x10001e9a
mov eax, ecx
jmp 0x10001e83
or dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1001c3d0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1b0
mov eax, dword [0x1004a008]
xor eax, esp
mov dword [esp + 0x1ac], eax
push esi
push edi
mov esi, ecx
lea eax, [esp + 0x20]
push eax
push 0x202
mov byte [esi], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov edi, eax
test edi, edi
jne 0x1001c454
mov ecx, dword [esp + 0x20]
cmp cl, 2
jne 0x1001c431
shr ecx, 8
cmp cl, 2
jne 0x1001c431
mov ecx, dword [esp + 0x1b4]
mov eax, esi
pop edi
mov byte [esi], 1
pop esi
xor ecx, esp
call fcn.1002529a
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.Invalid_WinSock_version
lea ecx, [esp + 0x10]
call fcn.1001b780
push 0x100490f0
lea eax, [esp + 0x10]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.WSAStartup_failed
call fcn.1001c0a0
push eax
push edi
lea ecx, [esp + 0x18]
call fcn.1001bc10
push 0x10049064
lea eax, [esp + 0x10]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x1001c520
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x1004a008]
xor eax, esp
mov dword [esp + 0x18], eax
mov al, byte [ebp + 8]
push esi
mov esi, ecx
test al, al
jne 0x1001c545
mov eax, 2
jmp 0x1001c54e
cmp al, 1
jne 0x1001c591
mov eax, 0x17
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x1001c5ae
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x1001c5d7
mov ecx, dword [esp + 0x1c]
mov eax, esi
pop esi
xor ecx, esp
call fcn.1002529a
mov esp, ebp
pop ebp
ret 4
push str.Unsupported_protocol
lea ecx, [esp + 8]
call fcn.1001c2b0
push 0x10049040
lea eax, [esp + 8]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_create_socket
call fcn.1001c0a0
push eax
call sub.WS2_32.dll_WSAGetLastError
push eax
lea ecx, [esp + 0x10]
call fcn.1001bc10
push 0x10049064
lea eax, [esp + 8]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov ecx, esi
call fcn.1001c9d0
push str.Failed_to_get_socket_flags
call fcn.1001c0a0
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea ecx, [esp + 0x10]
call fcn.1001bc10
push 0x10049064
lea eax, [esp + 8]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x1001c620
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x1004a008]
xor eax, esp
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push dword [ebp + 0xc]
mov ebx, ecx
mov dword [esp + 0x28], eax
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1001c67f
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
nop dword [eax]
call edi
cmp eax, 0x2714
jne 0x1001c693
push dword [ebp + 0xc]
push dword [esp + 0x28]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001c660
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1002529a
mov esp, ebp
pop ebp
ret 0x10
cmp esi, 0xffffffff
jne 0x1001c67f
call edi
cmp eax, 0x2733
jne 0x1001c6e2
push dword [ebp + 0x14]
mov ecx, ebx
push dword [ebp + 0x10]
push 1
call fcn.1001c880
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 4
push eax
lea eax, [esp + 0x2c]
push eax
push 0x1007
push 0xffff
push dword [ebx]
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, esi
je 0x1001c708
mov esi, dword [esp + 0x28]
test esi, esi
jne 0x1001c72e
jmp 0x1001c67f
push str.Failed_to_connect
call fcn.1001c0a0
push eax
call edi
push eax
lea ecx, [esp + 0x1c]
call fcn.1001bc10
push 0x10049064
lea eax, [esp + 0x14]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_get_socket_option
call fcn.1001c0a0
push eax
call edi
push eax
lea ecx, [esp + 0x1c]
call fcn.1001bc10
push 0x10049064
lea eax, [esp + 0x14]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push str.Failed_to_connect
call fcn.1001c0a0
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.1001bc10
push 0x10049064
lea eax, [esp + 0x14]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3

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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
push dword [ebp + 0x14]
mov ebx, ecx
push dword [ebp + 0x10]
push 1
call fcn.1001c880
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1001c7b8
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2714
jne 0x1001c7c3
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001c798
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp esi, 0xffffffff
jne 0x1001c7b8
push str.Failed_to_send_data
call fcn.1001c0a0
push eax
call edi
push eax
lea ecx, [esp + 0x18]
call fcn.1001bc10
push 0x10049064
lea eax, [esp + 0x10]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x1001c7f0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
push dword [ebp + 0x14]
mov ebx, ecx
push dword [ebp + 0x10]
push 0
call fcn.1001c880
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1001c848
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2714
jne 0x1001c853
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001c828
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp esi, 0xffffffff
jne 0x1001c848
push str.Failed_to_read_data
call fcn.1001c0a0
push eax
call edi
push eax
lea ecx, [esp + 0x18]
call fcn.1001bc10
push 0x10049064
lea eax, [esp + 0x10]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x1001ea70
Capabilities:
Encode data using xor

Disassembly:
mov cl, 3
xor edx, edx
xor byte [edx + 0x10291f10], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x233ff
jl 0x1001ea74
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x1026a7e0], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x2772d
jl 0x1001ea90
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x10249300], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x214da
jl 0x1001eab0
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x102259a8], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x23953
jl 0x1001ead0
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x101f0e10], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x34b95
jl 0x1001eaf0
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x101c9310], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x27af9
jl 0x1001eb10
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x101a5150], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x241bb
jl 0x1001eb30
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x101787d0], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x2c97e
jl 0x1001eb50
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x10140a60], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x37d6c
jl 0x1001eb70
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x10112558], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x2e502
jl 0x1001eb90
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x100ecdb0], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x257a1
jl 0x1001ebb0
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x100c4fb0], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x27dff
jl 0x1001ebd0
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x1009ac68], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x2a346
jl 0x1001ebf0
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x1006ea58], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x2c210
jl 0x1001ec10
mov cl, 3
xor edx, edx
nop dword [eax]
xor byte [edx + 0x1004a028], cl
mov al, cl
add al, al
inc edx
add cl, al
cmp edx, 0x24a2b
jl 0x1001ec30
ret

Function at 0x10023a40
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
call fcn.1001ea70
mov eax, dword [ebp + 0xc]
sub eax, 0
je 0x10023ad6
sub eax, 1
jne 0x10023aec
call fcn.100013f8
call fcn.10001541
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call fcn.10001905
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
call fcn.10024f20
push 0
push 0
push 0
push sym.r2.dll_Init
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x1001e890
push 0x102b5310
call fcn.10001974
push 0x1001e9e0
push 0x102b5314
call fcn.10001974
push 0x1001f7b0
push 0x102b5318
call fcn.10001974
call fcn.100016a7
call fcn.10024f20
mov eax, 1
pop ebp
ret 0xc
call fcn.10001541
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call fcn.10001905
call fcn.100016a7
mov eax, 1
pop ebp
ret 0xc
Function at 0x10023b50
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x1004a008]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x48], 0x44
push eax
lea eax, [ebp - 0x48]
xorps xmm0, xmm0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push ecx
movlpd qword [ebp - 0x44], xmm0
movlpd qword [ebp - 0x3c], xmm0
movlpd qword [ebp - 0x34], xmm0
movlpd qword [ebp - 0x2c], xmm0
movlpd qword [ebp - 0x24], xmm0
movlpd qword [ebp - 0x1c], xmm0
movlpd qword [ebp - 0x14], xmm0
movlpd qword [ebp - 0xc], xmm0
movups xmmword [ebp - 0x58], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002529a
mov esp, ebp
pop ebp
ret
Function at 0x10023f80
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x614
mov eax, dword [0x1004a008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x17fb570]
push ebx
push esi
push edi
test eax, eax
jne 0x10023fba
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, 0x17fb570
nop word [eax + eax]
push 0xa
call esi
mov eax, dword [edi]
test eax, eax
je 0x10023fb0
lea esi, [eax + 8]
lea ecx, [eax + 0x208]
mov dword [ebp - 0x60c], esi
add eax, 0x408
mov dword [ebp - 0x610], ecx
mov dword [ebp - 0x614], eax
xor eax, eax
cmp eax, 0x600
jae 0x1002417a
mov byte [ebp + eax - 0x604], 0
inc eax
cmp eax, 0x600
jl 0x10023fe1
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x608]
push eax
push 0x40
push 0x600
push esi
call ebx
push 0x600
lea eax, [ebp - 0x604]
push eax
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x608]
push eax
push dword [ebp - 0x608]
push 0x600
push esi
call ebx
mov edi, dword [ebp + 0x18]
lea eax, [ebp - 0x608]
cmp dword [ebp + 0x1c], 0x10
lea esi, [ebp + 8]
push eax
cmovae esi, dword [ebp + 8]
push 0x40
push edi
push dword [ebp - 0x60c]
call ebx
push edi
push esi
mov esi, dword [ebp - 0x60c]
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x608]
push eax
push dword [ebp - 0x608]
push edi
push esi
call ebx
mov edi, dword [ebp + 0x30]
lea eax, [ebp - 0x60c]
cmp dword [ebp + 0x34], 0x10
lea esi, [ebp + 0x20]
push eax
cmovae esi, dword [ebp + 0x20]
push 0x40
push edi
push dword [ebp - 0x610]
call ebx
push edi
push esi
mov esi, dword [ebp - 0x610]
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x60c]
push eax
push dword [ebp - 0x60c]
push edi
push esi
call ebx
mov esi, dword [ebp - 0x614]
lea eax, [ebp - 0x610]
push eax
push 0x40
push 5
push esi
call ebx
mov eax, dword [str.V0001]
mov dword [esi], eax
mov al, byte [0x100422fc]
mov byte [esi + 4], al
lea eax, [ebp - 0x610]
push eax
push dword [ebp - 0x610]
push 5
push esi
call ebx
mov edx, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
cmp edx, 0x10
jb 0x10024124
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1002411a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002415c
push edx
push ecx
call fcn.100252ab
add esp, 8
mov edx, dword [ebp + 0x34]
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 0xf
mov byte [ebp + 8], 0
cmp edx, 0x10
jb 0x1002416c
mov ecx, dword [ebp + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10024162
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10024162
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.100252ab
add esp, 8
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002529a
mov esp, ebp
pop ebp
ret
call fcn.1002587f
int3
Function at 0x10024f20
Capabilities:
Create thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002e510
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x1004a008]
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 dword [ebp - 0x20], 0
lea ecx, [ebp - 0x1c]
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
call fcn.1001ec50
mov dword [ebp - 4], 0
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x18]
mov ecx, esi
mov edi, dword [ebp - 0x1c]
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 4
je 0x10024ff7
cmp eax, 1
jbe 0x10024ff7
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x20], esp
push 1
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
push 0x100420b0
mov byte [ecx], 0
call fcn.10020c80
mov byte [ebp - 4], 1
sub esp, 0x18
mov edx, dword [ebp - 0x1c]
mov ecx, esp
lea edx, [edx + 0x18]
call fcn.1001f420
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.1001f4c0
add esp, 0x30
mov edx, 1
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
sub ecx, 0x48
cmp ecx, 0x18
jae 0x10025008
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
jmp 0x10024ffa
mov edx, dword [ebp - 0x20]
sub esi, edi
sub esi, 0x18
cmp esi, 0x18
jb 0x10025008
xor bl, bl
jmp 0x1002500a
mov bl, 1
test dl, 1
je 0x1002506b
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x1002506b
mov edx, dword [ebp - 0x28]
push ecx
call fcn.10022360
mov ecx, dword [ebp - 0x24]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x2c]
add esp, 4
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x10025061
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10025061
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.100252ab
add esp, 8
test bl, bl
je 0x10025081
mov ecx, str.R2_Launcher.exe
call fcn.10023b50
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x10024180
push 0
push 0
call esi
push 0
push 0
push 0
push 0x10024ed0
push 0
push 0
call esi
push 0
push 0
push 0
push 0x10024c20
push 0
push 0
call esi
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x10025116
mov edx, dword [ebp - 0x18]
push ecx
call fcn.100222f0
mov ecx, dword [ebp - 0x14]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x1c]
add esp, 4
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x1002510c
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1002510c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.100252ab
add esp, 8
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.1002529a
mov esp, ebp
pop ebp
ret
Function at 0x403a85
Capabilities:
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
push ebx
push esi
push edi
mov edi, dword [0x61327c]
mov ecx, edi
xor ebx, ebx
xor esi, esi
call fcn.0040e3f2
mov ecx, eax
xor edx, edx
mov eax, esi
div ecx
mov dword [ebp + esi*4 - 0x410], esi
inc esi
movzx eax, byte [edx + edi]
mov dword [ebp + esi*4 - 0x814], eax
cmp esi, 0x100
jl 0x403aa4
xor edx, edx
mov ecx, dword [ebp + edx - 0x810]
lea eax, [ebp + edx - 0x410]
mov esi, dword [eax]
add ecx, esi
add ebx, ecx
and ebx, 0x800000ff
jns 0x403aeb
dec ebx
or ebx, 0xffffff00
inc ebx
lea ecx, [ebp + ebx*4 - 0x410]
mov edi, dword [ecx]
add edx, 4
mov dword [eax], edi
mov dword [ecx], esi
cmp edx, 0x400
jl 0x403ac7
mov ecx, dword [ebp + 8]
call fcn.0040e3f2
mov ebx, eax
lea eax, [ebx + 1]
push eax
call dword [0x40f010]
xor esi, esi
xor edi, edi
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], esi
cmp ebx, esi
jle 0x403bc1
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], eax
sub dword [ebp - 4], ecx
mov dword [ebp - 0xc], ecx
inc esi
and esi, 0x800000ff
jns 0x403b47
dec esi
or esi, 0xffffff00
inc esi
lea eax, [ebp + esi*4 - 0x410]
mov ecx, dword [eax]
add edi, ecx
and edi, 0x800000ff
jns 0x403b62
dec edi
or edi, 0xffffff00
inc edi
lea edx, [ebp + edi*4 - 0x410]
mov ebx, dword [edx]
mov dword [eax], ebx
mov dword [edx], ecx
mov eax, dword [eax]
add eax, ecx
and eax, 0x800000ff
jns 0x403b81
dec eax
or eax, 0xffffff00
inc eax
mov edx, dword [ebp - 0xc]
mov cl, byte [edx]
movzx ebx, cl
lea eax, [ebp + eax*4 - 0x410]
cmp dword [eax], ebx
jne 0x403b9c
mov eax, dword [ebp - 4]
mov byte [eax + edx], cl
jmp 0x403ba6
mov al, byte [eax]
xor al, cl
mov ecx, dword [ebp - 4]
mov byte [ecx + edx], al
inc dword [ebp - 8]
mov ecx, dword [ebp + 8]
inc edx
mov dword [ebp - 0xc], edx
call fcn.0040e3f2
cmp dword [ebp - 8], eax
jl 0x403b36
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
pop edi
mov byte [eax + ecx], 0
mov ecx, dword [ebp + 0xc]
pop esi
mov dword [ecx], eax
pop ebx
leave
ret

Function at 0x404fa3
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push edi
push dword [ebp + 8]
push 0x40
push 0
push esi
call fcn.00405532
add esp, 0x10
test eax, eax
jne 0x404fc3
xor eax, eax
inc eax
jmp 0x405059
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x405056
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x405056
push dword [ebp + 8]
lea edi, [esi + 0x40]
push 0xf8
push eax
push edi
call fcn.00405532
add esp, 0x10
test eax, eax
je 0x404fbb
cmp dword [edi], 0x4550
jne 0x405056
mov eax, 0x10b
cmp word [esi + 0x58], ax
jne 0x405056
movzx eax, word [esi + 0x46]
test ax, ax
je 0x405056
imul eax, eax, 0x28
push eax
mov dword [esi + 0x140], eax
call fcn.0040e38d
pop ecx
mov dword [esi + 0x138], eax
test eax, eax
jne 0x40502b
push 3
jmp 0x405058
push dword [ebp + 8]
movzx ecx, word [esi + 0x54]
mov edx, dword [esi + 0x3c]
push dword [esi + 0x140]
lea ecx, [ecx + edx + 0x18]
push ecx
push eax
mov dword [esi + 0x13c], ecx
call fcn.00405532
add esp, 0x10
neg eax
sbb eax, eax
inc eax
jmp 0x405059
push 2
pop eax
pop edi
pop ebp
ret