joyce8/EMBER2024-capa huggingface dataset:
Function at 0x425a6a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x439d38]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x425ab0
cmp word [ebx], dx
jne 0x425ab0
or byte [eax + edi + 0x28], 4
jmp 0x425ab5
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x425c18
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x425bf8
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x425af6
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x425b2c
cmp eax, edx
jae 0x425b3a
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x425ad1
jmp 0x425c18
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x425bf3
cmp dword [ebp - 0x18], 0
je 0x425bf3
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x439d38]
test byte [eax + edi + 0x28], 0x48
je 0x425bc9
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x425b8d
mov word [esi], cx
jmp 0x425bc4
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x439d38]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x439d38]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x439d38]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x425c18
pop eax
cmp word [ebp - 4], ax
jne 0x425bd9
cmp esi, ebx
jne 0x425bd9
mov word [esi], ax
jmp 0x425c15
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041f194
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x425c18
push 0xd
pop eax
jmp 0x425bd4
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x439d38]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x425c12
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x425c18
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43000c
nop
nop
nop
nop
nop
pop eax
nop
add eax, 0x403d6f
sub eax, 0x403d15
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x430030
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
jne 0x43001e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp int.00401219
Function at 0x102d3d9
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x28]
call fcn.01026c7c
test eax, eax
je 0x102d3f2
xor eax, eax
jmp 0x102d441
push edi
xor edi, edi
cmp dword [0x1073398], edi
jne 0x102d424
push 0x1073398
push edi
push edi
push edi
push edi
push edi
push edi
push 0x222
push 0x20
push 2
push 0x10722e8
call dword [sym.imp.ntdll.dll_RtlAllocateAndInitializeSid]
test eax, eax
jge 0x102d424
xor eax, eax
jmp 0x102d440
lea eax, [ebp + 8]
push eax
push dword [0x1073398]
push dword [esi + 0x28]
call sub.ADVAPI32.dll_CheckTokenMembership
test eax, eax
jne 0x102d43d
mov dword [ebp + 8], edi
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret 4

Function at 0x102d90a
Capabilities:
Get domain information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
and dword [ebx], 0
push esi
mov esi, dword [ebp + 0xc]
and dword [esi], 0
lea eax, [ebp + 8]
push eax
push 1
push 0
call sub.NETAPI32.dll_DsRoleGetPrimaryDomainInformation
test eax, eax
jne 0x102d96f
mov edx, dword [ebp + 8]
mov eax, dword [edx]
test eax, eax
je 0x102d961
cmp eax, 2
je 0x102d961
cmp eax, 4
je 0x102d967
cmp eax, 5
je 0x102d967
test byte [edx + 7], 1
je 0x102d959
lea eax, [edx + 0x14]
push eax
call fcn.0102d8bd
test eax, eax
je 0x102d967
mov dword [ebx], 1
jmp 0x102d967
mov dword [esi], 1
push edx
call sub.NETAPI32.dll_DsRoleFreeMemory
xor eax, eax
pop esi
pop ebx
pop ebp
ret 8

Function at 0x102d975
Capabilities:
Get session user name

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 8], 0
cmp dword [ebp + 8], 1
mov dword [ebp - 4], 0x4b
jne 0x102d994
mov dword [ebp - 4], 0xc8
mov eax, dword [ebp - 4]
push ebx
push esi
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x102d9b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x102da33
push edi
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 8]
call sub.Secur32.dll_GetUserNameExW
test al, al
jne 0x102da21
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov ebx, eax
cmp ebx, 0x7a
je 0x102d9fb
cmp ebx, 0xea
je 0x102d9fb
cmp ebx, 0x534
je 0x102da29
inc dword [ebp - 8]
cmp dword [ebp - 8], 3
ja 0x102da29
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x102da10
mov eax, dword [ebp - 4]
push 2
add eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
test eax, eax
je 0x102da25
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 8]
call sub.Secur32.dll_GetUserNameExW
test al, al
je 0x102d9cc
xor ebx, ebx
jmp 0x102da32
call edi
mov ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop esi
pop ebx
leave
ret 4
Function at 0x1007570f
Capabilities:
Resolve function by parsing pe exports

Disassembly:
test edx, edx
pushal
jmp 0x10057752
mov eax, dword [ebp + 8]
cmp ah, 0x9b
push esi
cmc
push 0x1cf6ebc
test eax, eax
pushal
jmp 0x1007594c
lea esp, [esp + 0x24]
je 0x100580b7
sar ch, cl
clc
sub cl, 0x13
sal ecx, 0xd
add edx, eax
movsx cx, bl
bt bx, dx
push 0xa4f972f3
mov ecx, dword [esi + 0x7c]
jmp 0x1005f0ac
pushal
seta ah
xchg dword [esp + 0x1c], ebp
bt cx, sp
sal bp, cl
lea ebp, [esp + 0x1c]
not ah
aam 0xdc
sub esp, 0xfffffff4
aaa
xor al, 0xd9
movzx ax, al
push esi
rcr al, 6
aaa
push edi
shrd ax, cx, cl
movsx ax, al
btr ax, 8
aad 0x2e
push ebx
shl ax, cl
cwde
shr al, cl
push edx
aas
jmp 0x100573c4
lea esp, [esp + 0x28]
je 0x100580b7
sbb si, 0xa316
and esi, 0x7d0827ae
mov esi, dword [eax + 0x3c]
btr dx, sp
pushfd
add esi, eax
btr edx, 0x17
mov byte [esp], 0x22
mov edx, dword [esi + 0x78]
stc
bt sp, si
jmp 0x10056297
Function at 0x401f10
Capabilities:
Get disk information
Inspect load icon resource
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x148
push ebx
push esi
push edi
push 0x65
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [esp + 0xc]
call fcn.00401000
lea ecx, [esp + 0x50]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc]
push edx
call fcn.004012b0
test eax, eax
je 0x402021
lea eax, [esp + 0x50]
push 0x404030
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x402084
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x10]
call fcn.00401290
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
sub eax, 8
push 0
push eax
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x24]
push 8
push edx
call ebx
mov eax, dword [esp + 0x2c]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x48]
push 0x38
push ecx
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x50]
add esp, 0x3c
test eax, eax
mov eax, dword [esp + 0x10]
push edx
push eax
jne 0x401ffe
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401800
jmp 0x402084
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401a90
jmp 0x402084
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, eax
mov esi, 1
xor ebx, ebx
test edi, esi
je 0x40206a
mov dl, bl
lea ecx, [esp + 0x10]
add dl, 0x41
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x40412c
lea ecx, [esp + 0x14]
call fcn.004020e2
lea ecx, [esp + 0xc]
mov eax, dword [esp + 0x10]
push eax
push 0
call fcn.00401cf0
add esi, esi
inc ebx
cmp ebx, 0x1a
jl 0x402039
lea ecx, [esp + 0xc]
call fcn.00401040
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
call fcn.00401030
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x148
ret 0x10

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

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
mov ebx, 0x40c7d0
nop
mov ecx, 0x51f251ac
nop
nop
nop
test eax, eax
nop
nop
je 0x43204e
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x432024
nop
nop
mov eax, section..data
mov ebx, 0x42f314
nop
mov ecx, 0x2d3e1461
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x432084
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
add eax, 4
nop
nop
cmp eax, ebx
nop
nop
jne 0x43206c
nop
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x600a20
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xf1000]
push edi
or ebp, 0xffffffff
jmp 0x600a42
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x600a49
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x600a38
mov eax, 1
add ebx, ebx
jne 0x600a5b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x600a50
jne 0x600a6c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x600a50
xor ecx, ecx
sub eax, 3
jb 0x600a80
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x600af2
mov ebp, eax
add ebx, ebx
jne 0x600a8b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x600a98
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x600abc
inc ecx
add ebx, ebx
jne 0x600aa8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x600a9d
jne 0x600ab9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x600a9d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x600adc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x600acd
jmp 0x600a3e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x600adc
add edi, ecx
jmp 0x600a3e
pop esi
mov edi, esi
mov ecx, 0x4cf
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x600afa
cmp byte [edi], 7
jne 0x600afa
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x600aff
lea edi, [esi + 0x1fe000]
mov eax, dword [edi]
or eax, eax
je 0x600b6e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x209bbc]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x209bf8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x600b2c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x209bfc]
or eax, eax
je 0x600b68
mov dword [ebx], eax
add ebx, 4
jmp 0x600b49
call dword [esi + 0x209c0c]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x600b9f
cmp al, 0xef
ja 0x600b92
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x600b74
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x600b81
mov ebp, dword [esi + 0x209c00]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x600bd3
sub esp, 0xffffff80
jmp 0x402aa9
Function at 0x40121f
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push edi
push 0x40
pop ecx
xor eax, eax
xor ebx, ebx
mov byte [ebp - 0x104], bl
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x208], bl
lea edi, [ebp - 0x207]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [ebp - 0x104]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x104]
push 0x5c
push eax
call fcn.0041667d
cmp eax, ebx
pop ecx
pop ecx
je 0x4012cc
mov byte [eax], bl
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.004166f0
lea eax, [ebp - 0x208]
push str._rsdebug.ini
push eax
call fcn.00416700
add esp, 0x10
lea eax, [ebp - 0x208]
push eax
push ebx
push str.IsDebug
push str.Debug
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, ebx
mov dword [0x430170], eax
setne al
jmp 0x4012ce
xor al, al
pop edi
pop ebx
leave
ret

Function at 0x401339
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push edi
push 0x429384
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
je 0x4013ef
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.OpenThread
push edi
call esi
push str.Thread32First
push edi
mov dword [ebp - 4], eax
call esi
push str.Thread32Next
push edi
mov ebx, eax
call esi
push 0x42933c
push edi
mov dword [ebp - 8], eax
call esi
xor ecx, ecx
cmp dword [ebp - 4], ecx
je 0x4013ed
cmp ebx, ecx
je 0x4013ed
cmp dword [ebp - 8], ecx
je 0x4013ed
cmp eax, ecx
je 0x4013ed
push ecx
push 4
call eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x28]
push eax
push esi
mov dword [ebp - 0x28], 0x1c
call ebx
jmp 0x4013e9
cmp dword [ebp - 0x1c], edi
jne 0x4013e1
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0xc]
je 0x4013e1
push eax
push 0
push 2
call dword [ebp - 4]
test eax, eax
je 0x4013e1
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
lea eax, [ebp - 0x28]
push eax
push esi
call dword [ebp - 8]
test eax, eax
jne 0x4013c1
pop esi
pop ebx
pop edi
leave
ret

Function at 0x401aad
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401ac2
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x401ad4
xor eax, eax
jmp 0x401b06
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x401af8
cmp esi, eax
jae 0x401ad0
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401aea
cmp esi, eax
jae 0x401ad0
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret
Function at 0x401da4
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push esi
push edi
xor esi, esi
lea edi, [esi + 0x430180]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x401e09
push dword [esi + 0x430188]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [esi + 0x4301a4], eax
je 0x401e09
lea ecx, [ebp - 4]
push ecx
push 0x40
push 0x10
push eax
call ebx
lea eax, [ebp - 4]
push eax
push 0x40
push 0x20
lea eax, [esi + 0x4301c8]
push eax
call ebx
push 0
push 0
push edi
call fcn.004153c5
add esp, 0xc
add esi, 0x68
cmp esi, 0x138
jb 0x401db7
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret

Function at 0x401e85
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push edi
push 0x40
pop ecx
xor eax, eax
xor ebx, ebx
mov byte [ebp - 0x104], bl
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x208], bl
lea edi, [ebp - 0x207]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [ebp - 0x104]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x104]
push 0x5c
push eax
call fcn.0041667d
cmp eax, ebx
pop ecx
pop ecx
je 0x401f32
mov byte [eax], bl
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x208]
push eax
call fcn.004166f0
lea eax, [ebp - 0x208]
push str._rsdebug.ini
push eax
call fcn.00416700
add esp, 0x10
lea eax, [ebp - 0x208]
push eax
push ebx
push str.IsDebug
push str.Debug
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, ebx
mov dword [0x4302b8], eax
setne al
jmp 0x401f34
xor al, al
pop edi
pop ebx
leave
ret

Function at 0x401f79
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push esi
push edi
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x110], 0
lea edi, [ebp - 0x10f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 4]
push eax
push str.SOFTWARE_risingRAV
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x402003
and dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x429604
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402003
lea eax, [ebp - 0x110]
push str._rsmain.exe
push eax
call fcn.00416700
pop ecx
pop ecx
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402003
xor esi, esi
inc esi
jmp 0x402005
xor esi, esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x402014
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
mov eax, dword [esp + 4]
jle 0x40202a
mov dl, byte [esp + 0xc]
xor byte [eax], dl
inc eax
dec ecx
jne 0x402020
ret

Function at 0x40202b
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402043
test al, 0x10
je 0x402043
xor eax, eax
inc eax
jmp 0x402045
xor eax, eax
ret 4

Function at 0x402048
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
xor esi, esi
push esi
push esi
push 2
push esi
push 1
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [ebp + 8]
cmp edi, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x40207f
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [ebp + 0x10], eax
jbe 0x402084
or eax, 0xffffffff
jmp 0x4020eb
push ebx
push esi
push esi
push dword [ebp + 0x10]
mov dword [ebp - 8], esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 4]
push eax
mov ebx, 0x100000
push ebx
mov esi, 0x432618
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x4020d8
cmp dword [ebp - 4], 0
jbe 0x4020de
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 4]
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x10]
add dword [ebp - 8], eax
push 0
lea eax, [ebp - 4]
push eax
push ebx
push esi
push dword [ebp + 8]
call edi
test eax, eax
jne 0x4020ae
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
pop ebx
pop edi
pop esi
leave
ret

Function at 0x4020ef
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
xor edi, edi
push edi
push edi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [ebp - 4]
push eax
push 0x100000
push 0x432618
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40213b
cmp word [0x432618], 0x5a4d
jne 0x40213b
mov ecx, dword [0x432654]
cmp dword [ecx + 0x432618], 0x4550
je 0x402140
or eax, 0xffffffff
jmp 0x40216b
push esi
movzx esi, word [ecx + 0x43261e]
xor eax, eax
cmp esi, edi
jle 0x40216a
lea edx, [ecx + 0x432720]
mov ecx, dword [edx + 4]
add ecx, dword [edx]
cmp ecx, eax
jbe 0x40215f
mov eax, ecx
add edx, 0x28
inc edi
movsx ecx, di
cmp ecx, esi
jl 0x402154
pop esi
pop edi
leave
ret
Function at 0x4021b7
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
push esi
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4021e7
xor eax, eax
jmp 0x402237
movzx eax, word [ebp + 0xc]
push edi
push dword [ebp + 0x10]
push eax
push dword [0x53282c]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push dword [0x53282c]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push dword [0x53282c]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
pop edi
pop esi
leave
ret

Function at 0x40246f
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
push ebx
push esi
push edi
xor eax, eax
mov ecx, 0x82
lea edi, [ebp - 0x34b]
mov byte [ebp - 0x34c], 0
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x4025b6
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
call esi
test eax, eax
jle 0x4025b6
push edi
call esi
mov esi, 0x209
cmp eax, esi
jbe 0x4024c1
push 0x6f
pop eax
jmp 0x4025b9
push edi
push str._s.
lea eax, [ebp - 0x34c]
push esi
push eax
call fcn.004023bb
and dword [ebp + 8], 0
add esp, 0x10
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4025b2
lea eax, [ebp - 0x114]
push 0x429658
push eax
call fcn.00417850
test eax, eax
pop ecx
pop ecx
je 0x402576
lea eax, [ebp - 0x114]
push 0x429654
push eax
call fcn.00417850
test eax, eax
pop ecx
pop ecx
je 0x402576
lea eax, [ebp - 0x114]
push eax
push edi
push 0x42964c
lea eax, [ebp - 0x34c]
push esi
push eax
call fcn.004023bb
add esp, 0x14
cmp dword [ebp - 0x140], 0x10
lea eax, [ebp - 0x34c]
jne 0x40255d
push eax
call fcn.0040246f
pop ecx
jmp 0x402576
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x140]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40259a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x40259a
mov dword [ebp + 8], 1
cmp dword [ebp + 8], 0
je 0x4024fa
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor eax, eax
jmp 0x4025b9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret