joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5e8438
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdfc
push ebx
push esi
test dl, dl
je 0x5e844f
add esp, 0xfffffff0
call fcn.00408900
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.004c3dd4
mov eax, dword [0x67ca94]
cmp byte [eax], 0
jne 0x5e847c
push 0
call sub.ole32.dll_OleInitialize
test eax, 0x80000000
sete al
mov byte [ebx + 0x19c], al
mov eax, dword [0x67cecc]
cmp word [eax + 2], 0
jne 0x5e8496
mov eax, dword [0x67cecc]
mov dword [eax + 4], ebx
mov dword [eax], fcn.005ea8fc
mov eax, dword [0x67d040]
cmp word [eax + 2], 0
jne 0x5e84b0
mov eax, dword [0x67d040]
mov dword [eax + 4], ebx
mov dword [eax], fcn.005ead14
mov byte [ebx + 0x41], 0
mov dl, 1
mov eax, dword [0x5153d4]
call fcn.0051bf50
mov esi, eax
mov dword [ebx + 0x54], esi
mov dword [esi + 0xc], ebx
mov dword [esi + 8], 0x5eb2c0
mov dl, 1
mov eax, dword [0x48396c]
call fcn.004082dc
mov dword [ebx + 0xa8], eax
mov dl, 1
mov eax, dword [0x48396c]
call fcn.004082dc
mov dword [ebx + 0xc8], eax
xor eax, eax
mov dword [ebx + 0x74], eax
xor eax, eax
mov dword [ebx + 0x98], eax
mov dword [ebx + 0x70], 0xff000018
mov dword [ebx + 0x8c], 0x1f4
mov byte [ebx + 0x90], 1
xor eax, eax
mov dword [ebx + 0x94], eax
mov dword [ebx + 0x88], 0x9c4
mov byte [ebx + 0xbd], 1
mov byte [ebx + 0xd4], 1
mov dl, 1
mov eax, dword [0x51a544]
call fcn.005264e8
mov esi, eax
mov dword [ebx + 0xb8], esi
push 0x5e86a0
mov eax, dword [0x67cd1c]
mov eax, dword [eax]
push eax
call sub.user32.dll_LoadIconW
mov edx, eax
mov eax, esi
call fcn.00526a04
mov eax, dword [ebx + 0xb8]
mov dword [eax + 0x14], ebx
mov dword [eax + 0x10], 0x5eb5ac
mov dl, 1
mov eax, dword [0x48396c]
call fcn.004082dc
mov dword [ebx + 0xb0], eax
push pe_nt_image_headers32
lea eax, [ebp - 0x202]
push eax
mov eax, dword [0x67cd1c]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetModuleFileNameW
lea eax, [ebp - 0x202]
mov dx, 0x5c
call fcn.004282b0
test eax, eax
je 0x5e85c3
lea edx, [eax + 2]
lea eax, [ebp - 0x202]
call fcn.00428108
lea eax, [ebp - 0x202]
mov dx, 0x2e
call fcn.00428294
test eax, eax
je 0x5e85db
mov word [eax], 0
lea eax, [ebp - 0x202]
push eax
call sub.user32.dll_CharNextW
push eax
call sub.user32.dll_CharLowerW
lea eax, [ebx + 0xa4]
lea edx, [ebp - 0x202]
mov ecx, pe_nt_image_headers32
call fcn.0040ae84
push ebx
push 0x5ea2d0
call fcn.005dcb90
mov dword [ebx + 0x198], eax
mov byte [ebx + 0xe8], 0
mov eax, dword [0x67ca94]
cmp byte [eax], 0
jne 0x5e862c
mov eax, ebx
call fcn.005e8868
mov byte [ebx + 0x6d], 1
mov byte [ebx + 0x6e], 1
mov byte [ebx + 0x6f], 1
mov byte [ebx + 0xbe], 1
mov byte [ebx + 0xe9], 0
mov byte [ebx + 0xf4], 0
xor eax, eax
mov dword [ebx + 0xec], eax
mov byte [ebx + 0xeb], 0
xor eax, eax
mov dword [ebx + 0xc0], eax
mov eax, ebx
call fcn.005eb954
mov eax, ebx
call fcn.005ec60c
mov byte [ebx + 0x19e], 0
mov byte [ebx + 0xf5], 1
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x5e8697
call fcn.00408958
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x5e8b98
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [ebx + 0x190]
test eax, eax
je 0x5e8c3a
cmp dword [ebx + 0xac], 0
jne 0x5e8c34
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x5e8ad8
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0xa8]
cmp dword [eax + 8], 0
je 0x5e8c34
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongW
test al, 8
je 0x5e8bfa
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0xa8]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x5e8c34
push 0x213
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [ebx + 0xa8]
mov edx, esi
call fcn.004ae1e4
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x5e8c09
inc dword [ebx + 0xac]
pop ecx
pop edx
pop esi
pop ebx
ret

Function at 0x5e8f7c
Capabilities:
Enumerate gui resources
Hide graphical window

Disassembly:
push ebx
push esi
push edi
mov ebx, edx
mov esi, eax
mov eax, dword [0x684c60]
cmp dword [eax + 0x190], 0
je 0x5e90e5
test bl, bl
jne 0x5e9038
cmp dword [esi + 0xb4], 0
jne 0x5e902d
mov eax, esi
call fcn.005ec45c
push eax
push 0x5e8e7c
call sub.user32.dll_EnumWindows
cmp dword [esi + 0x58], 0
je 0x5e8ffe
mov eax, dword [0x684c60]
cmp byte [eax + 0xeb], 0
je 0x5e8ffe
mov eax, dword [esi + 0xf0]
test eax, eax
je 0x5e8fdf
sub eax, 4
mov eax, dword [eax]
mov edi, eax
dec edi
cmp edi, 0
jl 0x5e8ffe
push 0
mov eax, dword [esi + 0xf0]
mov eax, dword [eax + edi*4]
push eax
call sub.user32.dll_ShowWindow
dec edi
cmp edi, 0xffffffff
jne 0x5e8fe7
mov eax, dword [esi + 0xb0]
mov edi, dword [eax + 8]
dec edi
cmp edi, 0
jl 0x5e902d
cmp bl, 1
cmc
sbb eax, eax
push eax
mov eax, dword [esi + 0xb0]
mov edx, edi
call fcn.004ae1e4
push eax
call sub.user32.dll_ShowOwnedPopups
dec edi
cmp edi, 0xffffffff
jne 0x5e900d
inc dword [esi + 0xb4]
jmp 0x5e90e5
cmp dword [esi + 0xb4], 0
jle 0x5e90e5
dec dword [esi + 0xb4]
cmp dword [esi + 0xb4], 0
jne 0x5e90e5
cmp dword [esi + 0x58], 0
je 0x5e909a
mov eax, dword [0x684c60]
cmp byte [eax + 0xeb], 0
je 0x5e909a
mov eax, dword [esi + 0xf0]
test eax, eax
je 0x5e907b
sub eax, 4
mov eax, dword [eax]
mov edi, eax
dec edi
cmp edi, 0
jl 0x5e909a
push 5
mov eax, dword [esi + 0xf0]
mov eax, dword [eax + edi*4]
push eax
call sub.user32.dll_ShowWindow
dec edi
cmp edi, 0xffffffff
jne 0x5e9083
mov eax, dword [esi + 0xb0]
mov edi, dword [eax + 8]
dec edi
cmp edi, 0
jl 0x5e90c9
cmp bl, 1
cmc
sbb eax, eax
push eax
mov eax, dword [esi + 0xb0]
mov edx, edi
call fcn.004ae1e4
push eax
call sub.user32.dll_ShowOwnedPopups
dec edi
cmp edi, 0xffffffff
jne 0x5e90a9
mov eax, dword [esi + 0xb0]
mov edx, dword [eax]
call dword [edx + 8]
lea eax, [esi + 0xf0]
mov edx, dword [0x5d9688]
call fcn.0040d598
pop edi
pop esi
pop ebx
ret
Function at 0x5e9edc
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xfffffe00
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0xc4], 0
je 0x5e9f39
cmp byte [ebx + 0xeb], 0
jne 0x5e9f39
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x190]
push eax
call sub.user32.dll_GetWindowTextW
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.0040a258
mov eax, dword [esi]
test eax, eax
je 0x5e9f26
sub eax, 4
mov eax, dword [eax]
test eax, eax
jne 0x5e9f46
mov eax, esi
mov edx, dword [ebx + 0xa4]
call fcn.0040a4b0
jmp 0x5e9f46
mov eax, esi
mov edx, dword [ebx + 0xa4]
call fcn.0040a4b0
add esp, 0x200
pop esi
pop ebx
ret

Function at 0x5ebb68
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x98]
test esi, esi
je 0x5ebbd9
mov eax, esi
call fcn.00555270
test al, al
je 0x5ebbd9
mov eax, dword [ebx + 0x98]
call fcn.00554e08
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x5ebbd9
mov eax, dword [ebx + 0x98]
mov edx, dword [eax]
call dword [edx + 0x160]
test al, al
je 0x5ebbca
push 0
mov eax, dword [ebx + 0x98]
call fcn.00554e08
push eax
call sub.user32.dll_ShowWindow
mov eax, dword [ebx + 0x98]
xor edx, edx
call fcn.0054b140
jmp 0x5ebbd9
mov edx, dword [ebx + 0x88]
mov cl, 1
mov eax, ebx
call fcn.005eb974
pop esi
pop ebx
ret
Function at 0x5f1914
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
cmp dword [ebx + 0x94], 0
jne 0x5f199a
mov eax, dword [ebx + 8]
call fcn.00554e08
mov ecx, eax
mov dl, 1
mov eax, dword [0x562948]
call fcn.0054e9d0
mov dword [ebx + 0x94], eax
mov esi, dword [ebx + 0x94]
xor edx, edx
mov eax, esi
call fcn.00568af4
mov dword [esi + 0x2dc], ebx
mov dword [esi + 0x2d8], 0x5f11e4
push 8
mov edx, 3
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0xe0]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [ebx + 0x94]
call fcn.00554e08
push eax
call sub.user32.dll_SetWindowPos
push 0
mov eax, dword [ebx + 0x94]
call fcn.00554e08
push eax
call sub.user32.dll_ShowWindow
cmp dword [ebx + 0xa4], 0
jne 0x5f1a1c
mov eax, dword [ebx + 8]
call fcn.00554e08
mov ecx, eax
mov dl, 1
mov eax, dword [0x562948]
call fcn.0054e9d0
mov dword [ebx + 0xa4], eax
mov esi, dword [ebx + 0xa4]
mov dl, 1
mov eax, esi
call fcn.00568af4
mov dword [esi + 0x2dc], ebx
mov dword [esi + 0x2d8], 0x5f1230
push 8
push 0
mov edx, 2
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0xe0]
push eax
push 0
push 0
push 0
mov eax, dword [ebx + 0xa4]
call fcn.00554e08
push eax
call sub.user32.dll_SetWindowPos
push 0
mov eax, dword [ebx + 0xa4]
call fcn.00554e08
push eax
call sub.user32.dll_ShowWindow
cmp dword [ebx + 0x9c], 0
jne 0x5f1a9a
mov eax, dword [ebx + 8]
call fcn.00554e08
mov ecx, eax
mov dl, 1
mov eax, dword [0x56343c]
call fcn.0054e9d0
mov dword [ebx + 0x9c], eax
mov esi, dword [ebx + 0x9c]
mov byte [esi + 0x2b0], 1
push 8
mov edx, 3
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0xe0]
push eax
mov edx, 2
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0xe0]
push eax
push 0
push 0
push 0
mov eax, dword [ebx + 0x9c]
call fcn.00554e08
push eax
call sub.user32.dll_SetWindowPos
push 0
mov eax, dword [ebx + 0x9c]
call fcn.00554e08
push eax
call sub.user32.dll_ShowWindow
pop esi
pop ebx
ret
Function at 0x64a0cc
Capabilities:
Check for software breakpoints

Disassembly:
push ebx
mov ebx, eax
cmp dword [ebx + 0x14], 0xca
jne 0x64a0fa
mov eax, ebx
call fcn.0064ab88
cmp dword [ebx + 0x40], 0
je 0x64a0f3
mov dword [ebx + 0x14], 0xcf
mov eax, 1
pop ebx
ret
mov dword [ebx + 0x14], 0xcb
cmp dword [ebx + 0x14], 0xcb
jne 0x64a16b
mov edx, dword [ebx + 0x1b4]
cmp dword [edx + 0x10], 0
je 0x64a15d
cmp dword [ebx + 8], 0
je 0x64a11c
mov eax, ebx
mov edx, dword [eax + 8]
call dword [edx]
mov eax, ebx
mov edx, dword [eax + 0x1b4]
call dword [edx]
test eax, eax
jne 0x64a12e
xor eax, eax
pop ebx
ret
cmp eax, 2
je 0x64a15d
cmp dword [ebx + 8], 0
je 0x64a10f
cmp eax, 3
je 0x64a141
dec eax
jne 0x64a10f
mov edx, dword [ebx + 8]
inc dword [edx + 4]
mov ecx, dword [edx + 4]
mov eax, dword [ebx + 8]
cmp ecx, dword [eax + 8]
jl 0x64a10f
mov edx, dword [ebx + 0x140]
add dword [eax + 8], edx
jmp 0x64a10f
mov ecx, dword [ebx + 0x90]
mov dword [ebx + 0x98], ecx
jmp 0x64a189
cmp dword [ebx + 0x14], 0xcc
je 0x64a189
mov eax, dword [ebx]
mov dword [eax + 0x14], 0x14
mov edx, dword [ebx + 0x14]
mov dword [eax + 0x18], edx
mov eax, ebx
mov edx, dword [eax]
call dword [edx]
mov eax, ebx
call fcn.0064a194
pop ebx
ret

Function at 0x65e97c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
cmp byte [0x685514], 0
jne 0x65e993
call fcn.0065e938
mov eax, edi
dec eax
test eax, eax
jl 0x65e9bb
inc eax
xor edx, edx
movzx ecx, byte [esi + edx]
xor ecx, ebx
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x685114]
shr ebx, 8
xor ecx, ebx
mov ebx, ecx
inc edx
dec eax
jne 0x65e99d
mov eax, ebx
pop edi
pop esi
pop ebx
ret
Function at 0x661a14
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov ebx, eax
movzx eax, byte [ebx + 0x48]
mov eax, dword [ebx + eax*4 + 0x40]
movzx eax, byte [eax]
dec al
je 0x661a45
dec al
je 0x661a80
dec al
je 0x661ac4
dec al
je 0x661b36
jmp 0x661bd1
mov esi, dword [ebx + 0x24]
inc esi
mov edi, dword [ebx + 0x20]
sub edi, esi
jb 0x661bd1
inc edi
mov edx, esi
sub edx, dword [ebx + 0x24]
movzx ecx, byte [ebx + 0x48]
mov ecx, dword [ebx + ecx*4 + 0x40]
movzx edx, byte [ecx + edx]
movzx eax, byte [ebx + 0x48]
mov eax, dword [ebx + eax*4 + 0x40]
add dl, byte [eax + esi]
and dl, 0xff
mov byte [eax + esi], dl
inc esi
dec edi
jne 0x661a55
jmp 0x661bd1
mov edi, dword [ebx + 0x20]
test edi, edi
jbe 0x661bd1
mov esi, 1
movzx eax, byte [ebx + 0x48]
mov edx, eax
xor dl, 1
and edx, 0x7f
mov edx, dword [ebx + edx*4 + 0x40]
movzx edx, byte [edx + esi]
movzx ecx, al
mov ecx, dword [ebx + ecx*4 + 0x40]
add dl, byte [ecx + esi]
and dl, 0xff
and eax, 0x7f
mov eax, dword [ebx + eax*4 + 0x40]
mov byte [eax + esi], dl
inc esi
dec edi
jne 0x661a90
jmp 0x661bd1
mov edi, dword [ebx + 0x20]
test edi, edi
jbe 0x661bd1
mov esi, 1
movzx eax, byte [ebx + 0x48]
xor al, 1
and eax, 0x7f
mov eax, dword [ebx + eax*4 + 0x40]
movzx eax, byte [eax + esi]
mov edx, dword [ebx + 0x24]
mov ecx, esi
dec ecx
cmp edx, ecx
jbe 0x661af7
xor edx, edx
mov dword [esp + 4], edx
jmp 0x661b0c
mov edx, esi
sub edx, dword [ebx + 0x24]
movzx ecx, byte [ebx + 0x48]
mov ecx, dword [ebx + ecx*4 + 0x40]
movzx edx, byte [ecx + edx]
mov dword [esp + 4], edx
movzx edx, byte [ebx + 0x48]
mov ebp, dword [ebx + edx*4 + 0x40]
movzx edx, byte [ebp + esi]
add eax, dword [esp + 4]
sar eax, 1
jns 0x661b24
adc eax, 0
add dl, al
and dl, 0xff
mov byte [ebp + esi], dl
inc esi
dec edi
jne 0x661ad4
jmp 0x661bd1
xor eax, eax
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 8], eax
mov edi, dword [ebx + 0x20]
test edi, edi
jbe 0x661bd1
mov esi, 1
movzx eax, byte [ebx + 0x48]
xor al, 1
and eax, 0x7f
mov eax, dword [ebx + eax*4 + 0x40]
movzx eax, byte [eax + esi]
mov edx, dword [ebx + 0x24]
mov ecx, esi
dec ecx
cmp edx, ecx
ja 0x661b9d
mov edx, esi
sub edx, dword [ebx + 0x24]
movzx ecx, byte [ebx + 0x48]
mov ecx, dword [ebx + ecx*4 + 0x40]
movzx edx, byte [ecx + edx]
mov dword [esp + 4], edx
movzx edx, byte [ebx + 0x48]
xor dl, 1
and edx, 0x7f
mov edx, dword [ebx + edx*4 + 0x40]
mov ecx, esi
sub ecx, dword [ebx + 0x24]
movzx edx, byte [edx + ecx]
mov dword [esp + 8], edx
movzx edx, byte [ebx + 0x48]
mov edx, dword [ebx + edx*4 + 0x40]
movzx edx, byte [edx + esi]
mov dword [esp], edx
movzx ecx, byte [esp + 8]
push eax
movzx eax, byte [esp + 8]
pop edx
call fcn.0065e9c4
movzx edx, byte [ebx + 0x48]
mov edx, dword [ebx + edx*4 + 0x40]
add al, byte [esp]
and al, 0xff
mov byte [edx + esi], al
inc esi
dec edi
jne 0x661b52
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
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 + 0x436190]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x401e09
push dword [esi + 0x436198]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [esi + reloc.KERNEL32.dll_CreateFileA], 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 + 0x4361d8]
push eax
call ebx
push 0
push 0
push edi
call fcn.00415b72
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.00416e2d
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.00416ea0
lea eax, [ebp - 0x208]
push str._rsdebug.ini
push eax
call fcn.00416eb0
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 [0x4362c8], eax
setne al
jmp 0x401f34
xor al, al
pop edi
pop ebx
leave
ret

Function at 0x401fd3
Capabilities:
Encode data using xor

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

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402002
test al, 0x10
je 0x402002
xor eax, eax
inc eax
jmp 0x402004
xor eax, eax
ret 4
Function at 0x402007
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 0x40203e
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [ebp + 0x10], eax
jbe 0x402043
or eax, 0xffffffff
jmp 0x4020aa
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, 0x4388b8
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x402097
cmp dword [ebp - 4], 0
jbe 0x40209d
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 0x40206d
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 0x4020ae
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 0x4388b8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4020fa
cmp word [0x4388b8], 0x5a4d
jne 0x4020fa
mov ecx, dword [0x4388f4]
cmp dword [ecx + 0x4388b8], 0x4550
je 0x4020ff
or eax, 0xffffffff
jmp 0x40212a
push esi
movzx esi, word [ecx + 0x4388be]
xor eax, eax
cmp esi, edi
jle 0x402129
lea edx, [ecx + 0x4389c0]
mov ecx, dword [edx + 4]
add ecx, dword [edx]
cmp ecx, eax
jbe 0x40211e
mov eax, ecx
add edx, 0x28
inc edi
movsx ecx, di
cmp ecx, esi
jl 0x402113
pop esi
pop edi
leave
ret

Function at 0x40224b
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 0x40227b
xor eax, eax
jmp 0x4022cb
movzx eax, word [ebp + 0xc]
push edi
push dword [ebp + 0x10]
push eax
push dword [0x538acc]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push dword [0x538acc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push dword [0x538acc]
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 0x402626
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebx
push ebp
push esi
push edi
mov esi, str.C:UsersADMINI1AppDataLocalTempRsdSfxTmp
push esi
mov edi, 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x40264d
push edi
push str.C:Temp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push esi
call fcn.00401fea
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor ebx, ebx
test eax, eax
jne 0x40266e
push esi
call fcn.00401e1c
pop ecx
push ebx
push esi
call ebp
test eax, eax
je 0x4026cd
push 0x5c
push esi
call fcn.00416e2d
cmp eax, ebx
pop ecx
pop ecx
je 0x402683
cmp byte [eax + 1], bl
jne 0x402683
mov byte [eax], bl
push edi
push str.RsdSfxTmp
push esi
call fcn.004175fb
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4026b8
push esi
call fcn.004024d7
pop ecx
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call fcn.00401e1c
pop ecx
push ebx
push esi
call ebp
push esi
call fcn.00401fea
test eax, eax
jne 0x4026e4
cmp dword [esp + 0x14], ebx
jne 0x4026e0
push 0x10
push 9
push ebx
call fcn.0040219a
add esp, 0xc
xor eax, eax
jmp 0x4026e7
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x402928
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x4029fb
cmp dword [ebp + 0xc], ebx
je 0x4029fb
push edi
push 0x40
pop ecx
push dword [ebp + 8]
xor eax, eax
mov byte [ebp - 0x110], bl
lea edi, [ebp - 0x10f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x42e6ec
stosb byte es:[edi], al
lea eax, [ebp - 0x110]
push 0x104
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], 1
call fcn.00402423
add esp, 0x10
lea eax, [ebp - 4]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x110]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
pop edi
jne 0x4029f0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0xc]
push eax
push ebx
push 0x42e6e0
push dword [ebp - 4]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 0xc]
call fcn.00416720
test eax, eax
pop ecx
je 0x4029e7
cmp esi, 0x7fffffff
ja 0x4029e7
push 0x42e6dc
push esi
push dword [ebp + 0xc]
call fcn.0040244a
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
call fcn.00416720
pop ecx
jmp 0x4029fd
xor eax, eax
pop ebx
leave
ret
Function at 0x403a28
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
push edi
call fcn.004038a5
mov esi, dword [esp + 0x10]
push esi
call fcn.004024d7
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
pop ecx
xor ebx, ebx
push esi
call edi
cmp eax, 0xffffffff
je 0x403a63
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call fcn.004024d7
inc ebx
cmp ebx, 0xa
pop ecx
jl 0x403a43
call fcn.004038a5
push esi
call edi
inc eax
neg eax
pop edi
sbb eax, eax
pop esi
inc eax
pop ebx
ret

Function at 0x403ac0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
call fcn.00403961
lea eax, [ebp - 8]
push eax
push str.SOFTWARE_risingRAV
push 0x80000002
mov dword [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x403b08
push 4
lea eax, [ebp - 4]
push eax
push 4
push 0
push str.Is3MPackage
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
neg eax
sbb eax, eax
inc eax
leave
ret
xor eax, eax
leave
ret

Function at 0x403b0c
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
call fcn.00403961
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 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x403ba6
call fcn.004038a5
and dword [ebp - 8], 0
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x42e840
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403ba6
call fcn.00403961
lea eax, [ebp - 0x110]
push str._rsmain.exe
push eax
call fcn.00416eb0
pop ecx
pop ecx
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x403ba6
xor esi, esi
inc esi
jmp 0x403bad
call fcn.004038a5
xor esi, esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
leave
ret