joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40cf5b
Capabilities:
Hide graphical window

Disassembly:
mov al, byte [esp + 0x14]
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x20]
mov ebx, ecx
push esi
push 0
push ebp
mov dword [ebx + 8], ebp
mov byte [ebx + 0x1e], al
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [esp + 0x20]
mov ecx, ebx
call fcn.0040ccd0
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x2c]
mov dword [ebx + 0x18], eax
lea eax, [esp + 0xc]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowRect]
push 2
lea eax, [esp + 0x10]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetParent]
push eax
push 0
call dword [sym.imp.USER32.dll_MapWindowPoints]
cmp dword [ebx + 4], 0
je 0x40cfc5
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0x14]
push edi
push ebx
push dword [ebx]
sub esi, eax
lea edi, [eax + 1]
push 0
push ebp
sub esi, 2
call dword [sym.imp.USER32.dll_GetParent]
push eax
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x24]
push eax
push esi
push dword [esp + 0x2c]
xor esi, esi
push edi
push 0x40000000
push esi
push 0x424dec
push esi
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [ebx + 4], eax
pop edi
cmp dword [ebx + 0x10], esi
jne 0x40d047
test ebp, ebp
je 0x40d05d
cmp dword [ebx + 0x18], esi
jne 0x40d05d
cmp dword [ebx + 0x14], esi
je 0x40d05d
push dword [ebx + 0x14]
mov ecx, ebx
call fcn.0040cd86
mov esi, eax
test esi, esi
je 0x40d05d
push 5
push ebp
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
push ebp
call dword [sym.imp.USER32.dll_SetWindowTextW]
push esi
call fcn.00416580
pop ecx
jmp 0x40d05d
test eax, eax
je 0x40d05d
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_UpdateWindow]
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14
Function at 0x40d2e8
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push 0x42544c
push 1
push ebx
push 0x42551c
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40d3b9
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push 0x42550c
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x40d3b0
cmp byte [ebp + 8], bl
je 0x40d33b
mov eax, dword [ebp - 8]
push 2
push dword [ebp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
cmp dword [ebp + 0x18], ebx
je 0x40d358
mov eax, dword [ebp - 4]
push dword [ebp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 4]
push ebx
mov ecx, dword [eax]
cmp dword [ebp + 0x1c], ebx
jne 0x40d36a
push 0x424254
jmp 0x40d36d
push dword [ebp + 0x1c]
push eax
call dword [ecx + 0x44]
cmp dword [ebp + 0x20], ebx
je 0x40d382
mov eax, dword [ebp - 4]
push dword [ebp + 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
cmp dword [ebp + 0x14], ebx
je 0x40d393
mov eax, dword [ebp - 4]
push dword [ebp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [ebp - 8]
push 1
push dword [ebp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
test eax, eax
js 0x40d3a7
mov bl, 1
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 0x1c

Function at 0x40d467
Capabilities:
Get common file path

Disassembly:
push dword [esp + 4]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
neg eax
sbb eax, eax
neg eax
ret 8

Function at 0x40d925
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.004112b0
push 0x800
lea eax, [ebp - 0x1020]
push eax
call fcn.0040d467
cmp byte [0x458df2], 0
jne 0x40d9ba
push 6
push dword [0x42d038]
lea eax, [ebp - 0x1020]
push eax
call fcn.00403501
push eax
call fcn.00406bbe
test eax, eax
jne 0x40d9ba
push 0x424270
call fcn.0040d801
lea eax, [ebp - 0x1020]
push eax
call fcn.00416565
xor ecx, ecx
push 0x1e
push ecx
mov word [ebp + eax*2 - 0x101e], cx
lea eax, [ebp - 0x20]
push eax
call fcn.00412310
add esp, 0x10
mov dword [ebp - 0x1c], 3
push 0x14
pop eax
mov word [ebp - 0x10], ax
lea eax, [ebp - 0x1020]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov esp, ebp
pop ebp
ret
Function at 0x40da16
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
cmp dword [0x42d04c], 0
push ebx
push esi
push edi
mov ebx, 0x400
jne 0x40da61
push 0x64
lea eax, [ebp - 0x12c]
push eax
push 0xf
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ax, word [ebp - 0x12c]
mov word [0x45ae20], ax
xor eax, eax
mov word [0x45ae22], ax
mov dword [0x42d04c], 0x45ae20
push 0x32
lea eax, [ebp - 0x64]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040595a
mov edi, dword [ebp + 0x10]
xor eax, eax
mov esi, dword [ebp + 0x14]
push esi
push edi
push 0x42d03c
mov word [edi], ax
lea eax, [ebp - 0x64]
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
xor eax, eax
mov word [edi + esi*2 - 2], ax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x40dcbb
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x200c
call fcn.004112b0
cmp byte [0x44d708], 0
je 0x40dd64
lea eax, [ebp - 0x200c]
push eax
push dword [ebp + 8]
call fcn.0040f054
lea eax, [ebp - 8]
push eax
push 1
push 0
push str.SoftwareWinRAR_SFX
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40dd64
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x1000
push eax
lea eax, [ebp - 0x100c]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x200c]
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40dd5b
mov eax, dword [ebp - 4]
mov ecx, 0x7ff
shr eax, 1
mov dword [ebp - 4], eax
cmp eax, ecx
jb 0x40dd3f
mov eax, ecx
push dword [ebp + 0xc]
xor ecx, ecx
mov word [ebp + eax*2 - 0x100c], cx
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.00405a3a
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esp, ebp
pop ebp
ret 8
Function at 0x40de10
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x2004
call fcn.004112b0
mov ecx, dword [esp + 0x2014]
push ebx
xor ebx, ebx
push esi
test ecx, ecx
je 0x40de2b
mov byte [ecx], bl
mov edx, dword [esp + 0x2020]
test edx, edx
je 0x40de38
mov byte [edx], bl
mov esi, dword [esp + 0x2010]
test esi, esi
je 0x40defb
movzx eax, word [esi]
test ax, ax
je 0x40defb
push ebp
mov ebp, dword [esp + 0x2018]
push edi
mov edi, dword [esp + 0x2020]
mov dword [esp + 0x10], ebx
movzx eax, ax
add esi, 2
cmp eax, 0x3d
jne 0x40de85
test edi, edi
je 0x40de8f
test ebx, ebx
jne 0x40de8f
test ecx, ecx
je 0x40de81
mov byte [ecx], 1
mov ebx, ebp
jmp 0x40dea6
cmp eax, 0xd
je 0x40deb9
cmp eax, 0xa
je 0x40debc
mov word [ebp], ax
add ebp, 2
mov eax, dword [esp + 0x202c]
add eax, 0xfffffffe
cmp dword [esp + 0x10], eax
jge 0x40deb4
movzx eax, word [esi]
inc dword [esp + 0x10]
test ax, ax
jne 0x40de67
jmp 0x40debc
mov byte [edx], 1
jmp 0x40debc
add esi, 2
xor eax, eax
mov word [ebp], ax
test edi, edi
je 0x40def5
mov word [edi], ax
test ebx, ebx
je 0x40def5
push 0x1000
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [esp + 0x202c]
lea eax, [esp + 0x18]
push eax
push edi
call fcn.00405a3a
xor eax, eax
mov word [ebx], ax
pop edi
mov eax, esi
pop ebp
jmp 0x40defd
xor eax, eax
pop esi
pop ebx
add esp, 0x2004
ret 0x18

Function at 0x40df08
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea eax, [ebp - 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
lea eax, [ebp - 4]
push eax
xor eax, eax
push eax
push eax
push dword [ebp + 0xc]
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderLocation]
mov ebx, eax
neg ebx
sbb bl, bl
add bl, 1
je 0x40df57
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [ebp - 4]
dec eax
neg eax
sbb al, al
lea ebx, [eax + 1]
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
jmp 0x40df5f
mov eax, dword [ebp + 8]
xor ecx, ecx
mov word [eax], cx
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x40fffa
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x1040
call fcn.004112b0
push ebx
push esi
mov esi, dword [esp + 0x1050]
xor ebx, ebx
cmp word [esi], bx
je 0x410232
push esi
call fcn.00416565
pop ecx
cmp eax, 0x7f6
jae 0x410232
push edi
push 0x3c
pop edi
push edi
lea eax, [esp + 0x14]
push ebx
push eax
call fcn.00412310
add esp, 0xc
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], 0x1c0
cmp byte [esp + 0x1058], bl
je 0x41005a
mov dword [esp + 0x14], 0x5c0
movzx ecx, word [esi]
lea edx, [esi + 2]
push 0x22
pop edi
cmp cx, di
je 0x41006a
mov edx, esi
mov dword [esp + 0x20], edx
mov eax, ebx
push ebp
test cx, cx
je 0x4100b4
push 0x20
mov ecx, esi
pop ebp
cmp word [ecx], di
jne 0x410095
jmp 0x410088
cmp word [esi + eax*2], di
je 0x410091
inc eax
cmp word [esi + eax*2], bx
jne 0x410082
jmp 0x410095
mov word [esi + eax*2], bp
cmp word [esi + eax*2], bp
je 0x410209
cmp word [esi + eax*2 + 2], 0x2f
je 0x410203
inc eax
lea ecx, [esi + eax*2]
cmp word [ecx], bx
jne 0x41007b
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4100c1
cmp word [eax], bx
jne 0x4100db
cmp byte [esp + 0x105c], bl
jne 0x4100db
cmp word [0x44e70a], bx
je 0x4100db
mov dword [esp + 0x28], 0x44e70a
push edx
mov dword [esp + 0x34], 1
call fcn.00403100
mov esi, eax
test esi, esi
je 0x410106
push str..inf
push esi
call fcn.00406b9c
test eax, eax
jne 0x410106
mov dword [esp + 0x20], 0x4253bc
push dword [esp + 0x24]
call fcn.00402391
test al, al
je 0x41012e
push 0x800
lea eax, [esp + 0x54]
push eax
push dword [esp + 0x2c]
call fcn.00402e89
lea eax, [esp + 0x50]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x410230
mov edi, dword [esp + 0x1054]
mov ebp, dword [sym.imp.USER32.dll_ShowWindow]
cmp byte [0x44d700], bl
jne 0x410167
cmp byte [esp + 0x105c], bl
jne 0x410167
cmp byte [0x459e12], bl
je 0x4101c6
test edi, edi
je 0x41017c
push edi
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x41017c
push ebx
push edi
call ebp
mov bl, 1
push 0x7d0
push dword [esp + 0x50]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push dword [esp + 0x4c]
call fcn.0041045b
cmp byte [0x459e12], 0
je 0x4101c6
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x4101c6
mov eax, dword [esp + 0x10]
add eax, 0x3e8
cmp eax, dword [0x459e14]
jbe 0x4101c6
mov dword [0x459e14], eax
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4101e3
push str..exe
push esi
call fcn.00406b9c
test eax, eax
je 0x41021c
cmp byte [0x44d700], 0
mov al, byte [esp + 0x105c]
je 0x410223
test al, al
jne 0x410223
mov dword [0x459e18], 0x1b58
jmp 0x410223
cmp word [esi + eax*2], bp
jne 0x41020f
xor ecx, ecx
mov word [esi + eax*2], cx
inc eax
lea eax, [esi + eax*2]
mov dword [esp + 0x28], eax
jmp 0x4100b8
mov al, byte [esp + 0x105c]
test bl, bl
je 0x410230
test al, al
je 0x410230
push 1
push edi
call ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1040
ret 0xc
Function at 0x41023d
Capabilities:
Hide graphical window

Disassembly:
and dword [0x4466dc], 0
push 1
push dword [esp + 8]
mov byte [0x4466d0], 1
mov byte [0x4466d1], 1
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 2
push dword [esp + 0xc]
call fcn.0040112d
cmp dword [0x44d6f0], 0
jne 0x41027d
cmp byte [0x4466d6], 0
je 0x410286
cmp dword [0x4466cc], 0
jne 0x410299
push 0
push 1
push 0x111
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_SendMessageW]
ret 4

Function at 0x41036c
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.004112b0
cmp byte [0x44d708], 0
je 0x4103f6
cmp word [0x459e20], 0
je 0x4103f6
push esi
lea eax, [ebp - 0x1008]
push eax
push 0x459e20
call fcn.0040f054
lea eax, [ebp - 8]
xor esi, esi
push eax
lea eax, [ebp - 4]
push eax
push esi
push 0x20006
push esi
push esi
push esi
push str.SoftwareWinRAR_SFX
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4103f5
push dword [ebp + 8]
call fcn.00416565
pop ecx
lea eax, [eax*2 + 2]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x1008]
push 1
push esi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x4103fc
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2000
call fcn.004112b0
push esi
push dword [ebp + 8]
push str.sfxcmd
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x1000
lea eax, [ebp - 0x2000]
push eax
push dword [ebp + 8]
call fcn.00405811
mov esi, eax
test esi, esi
je 0x410454
movzx ecx, word [esi]
push ecx
jmp 0x41043f
add esi, 2
movzx eax, word [esi]
push eax
call fcn.00405908
test al, al
jne 0x410438
push esi
push str.sfxpar
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x100047b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
push 0x401000
call fcn.10004990
add esp, 4
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
lea ecx, [ebp - 4]
push eax
call fcn.10005150
mov dword [ebp - 0x14], 4
mov esi, dword [eax]
lea eax, [ebp - 0x10]
push eax
push 0x40
push 4
push esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
setne byte [ebp - 0xc]
mov esi, dword [esi]
test eax, eax
je 0x10004811
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp - 0x14]
mov dword [ebp - 4], eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, 0x53ec8b55
jne 0x10004823
mov eax, 0x3e9
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, 0x401000
call fcn.100050e0
cmp eax, 0x16197be9
jne 0x1000483e
mov eax, 0x3ea
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, 0x8245bc
call fcn.100050e0
cmp eax, 0x94bf
jne 0x10004859
mov eax, 0x3f3
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, 0x8252fc
call fcn.100050e0
cmp eax, 0x94bf
jne 0x10004874
mov eax, 0x44d
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, 0x82533c
call fcn.100050e0
cmp eax, 0x94bf
jne 0x1000488f
mov eax, 0x457
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, 0x858d51
call fcn.100050e0
cmp eax, 0x3539f633
jne 0x100048aa
mov eax, 0xc80
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, 0x858c61
call fcn.100050e0
xor ecx, ecx
mov edx, 0xc8a
cmp eax, 0x3539f633
pop esi
cmove ecx, edx
mov eax, ecx
mov esp, ebp
pop ebp
ret

Function at 0x100049e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
xor ecx, ecx
mov dword [ebp - 0x10], 0
cmp byte [ebp + 0x14], cl
cmovne ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x100049ff
mov byte [ebp - 4], cl
jmp 0x10004a1c
mov eax, dword [ebp + 8]
lea edx, [ebp - 8]
push edx
push 0x40
push ecx
push eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
setne byte [ebp - 4]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.10022c20
add esp, 0xc
cmp byte [ebp - 4], 0
je 0x10004a4a
mov eax, dword [ebp - 8]
lea ecx, [ebp + 0x14]
push ecx
push eax
push dword [ebp - 0xc]
mov dword [ebp + 0x14], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esp, ebp
pop ebp
ret
Function at 0x10004a50
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
xor ecx, ecx
cmp byte [ebp + 0x14], cl
push ebx
cmovne ecx, dword [ebp + 0x10]
push esi
xor esi, esi
mov dword [ebp - 0x10], esi
test ecx, ecx
jne 0x10004a6e
xor bl, bl
jmp 0x10004a8d
mov eax, dword [ebp + 8]
lea edx, [ebp - 8]
push edx
push 0x40
push ecx
push eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [ebp - 0x10]
test eax, eax
setne bl
push dword [ebp + 0x10]
mov byte [ebp - 4], bl
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.10022c20
add esp, 0xc
test bl, bl
je 0x10004aba
mov eax, dword [ebp - 8]
lea ecx, [ebp + 0x14]
push ecx
push eax
push dword [ebp - 0xc]
mov dword [ebp + 0x14], eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10004ac0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 8], eax
mov eax, esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub eax, 1
je 0x10004af4
sub eax, 1
je 0x10004b4d
sub eax, 2
je 0x10004bad
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov bl, byte [ebp + 0xc]
mov eax, dword [ebp + 8]
sub bl, al
mov bh, byte [ebp + 0x14]
dec bl
mov dword [ebp - 4], eax
movzx ecx, bh
mov dword [ebp - 0x18], 0
test bh, bh
jne 0x10004b19
mov byte [ebp - 0xc], bh
mov byte [eax], bl
jmp 0x10004b50
lea edx, [ebp - 0x10]
mov dword [ebp - 0x14], ecx
push edx
push 0x40
push ecx
push eax
mov dword [ebp - 0x18], eax
call edi
mov ecx, dword [ebp - 4]
test eax, eax
setne byte [ebp - 0xc]
mov byte [ecx], bl
test eax, eax
je 0x10004b50
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp - 0x14]
mov dword [ebp - 4], eax
push dword [ebp - 0x18]
call edi
jmp 0x10004b50
mov bh, byte [ebp + 0x14]
mov eax, dword [ebp - 8]
sub eax, esi
mov dword [ebp - 0x18], 0
mov esi, dword [ebp + 8]
sub eax, esi
movzx eax, ax
mov dword [ebp - 8], eax
movzx ecx, ax
movzx eax, bh
add eax, eax
jne 0x10004b7a
mov byte [ebp - 0xc], 0
mov word [esi], cx
jmp 0x10004bad
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x18], esi
call edi
mov ecx, dword [ebp - 8]
test eax, eax
setne byte [ebp - 0xc]
mov word [esi], cx
test eax, eax
je 0x10004bad
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 8]
push ecx
push eax
push dword [ebp - 0x14]
mov dword [ebp - 8], eax
push dword [ebp - 0x18]
call edi
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
add eax, esi
mov ebx, dword [ebp + 0xc]
sub ebx, eax
mov dword [ebp - 0x18], 0
movzx eax, byte [ebp + 0x14]
shl eax, 2
test eax, eax
jne 0x10004bd8
mov byte [ebp - 0xc], al
mov dword [esi], ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x18], esi
call edi
test eax, eax
setne byte [ebp - 0xc]
mov dword [esi], ebx
test eax, eax
je 0x10004c07
mov eax, dword [ebp - 0x10]
lea ecx, [ebp + 0x10]
push ecx
push eax
push dword [ebp - 0x14]
mov dword [ebp + 0x10], eax
push dword [ebp - 0x18]
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10004c10
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0xc]
xor edx, edx
push ebx
movzx ebx, byte [ebp + 0x10]
mov dword [ebp - 0x14], edx
push esi
mov esi, eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
test ebx, ebx
jne 0x10004c35
xor cl, cl
jmp 0x10004c50
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x10], ebx
push ecx
push 0x40
push ebx
push eax
mov dword [ebp - 0x14], eax
call edi
mov edx, dword [ebp - 0x14]
test eax, eax
mov eax, dword [ebp + 0xc]
setne cl
mov byte [ebp - 8], cl
mov ch, byte [esi]
mov byte [ebp + 0x13], ch
test cl, cl
je 0x10004c73
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp - 0x10]
mov dword [ebp - 4], eax
push edx
call edi
mov eax, dword [ebp + 0xc]
mov ch, byte [ebp + 0x13]
movzx ecx, ch
sub ecx, 0xe8
je 0x10004d4c
sub ecx, 1
je 0x10004d4c
sub ecx, 0x16
jne 0x10004d3c
mov dword [ebp - 0x14], ecx
lea esi, [eax + 1]
test ebx, ebx
jne 0x10004ca2
xor cl, cl
jmp 0x10004cba
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], ebx
push eax
push 0x40
push ebx
push esi
mov dword [ebp - 0x14], esi
call edi
test eax, eax
mov eax, dword [ebp + 0xc]
setne cl
mov byte [ebp - 8], cl
mov dl, byte [esi]
mov byte [ebp + 0x13], dl
test cl, cl
je 0x10004cdf
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp - 0x10]
mov dword [ebp - 4], eax
push dword [ebp - 0x14]
call edi
mov eax, dword [ebp + 0xc]
mov dl, byte [ebp + 0x13]
cmp dl, 0x15
je 0x10004ce9
cmp dl, 0x25
jne 0x10004d3c
shl ebx, 2
lea esi, [eax + 2]
xor ecx, ecx
mov dword [ebp - 0x14], ecx
test ebx, ebx
jne 0x10004cfc
xor al, al
jmp 0x10004d14
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], ebx
push eax
push 0x40
push ebx
push esi
mov dword [ebp - 0x14], esi
call edi
mov ecx, dword [ebp - 0x14]
test eax, eax
setne al
mov byte [ebp - 8], al
mov esi, dword [esi]
test al, al
je 0x10004d2e
mov eax, dword [ebp - 0xc]
lea edx, [ebp + 0x10]
push edx
push eax
push dword [ebp - 0x10]
mov dword [ebp + 0x10], eax
push ecx
call edi
mov eax, dword [ebp + 8]
mov ecx, dword [esi]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
mov dword [eax], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
shl ebx, 2
lea esi, [eax + 1]
xor ecx, ecx
mov dword [ebp - 0x14], ecx
test ebx, ebx
jne 0x10004d5f
xor al, al
jmp 0x10004d77
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], ebx
push eax
push 0x40
push ebx
push esi
mov dword [ebp - 0x14], esi
call edi
mov ecx, dword [ebp - 0x14]
test eax, eax
setne al
mov byte [ebp - 8], al
mov ebx, dword [esi]
test al, al
je 0x10004d91
mov eax, dword [ebp - 0xc]
lea edx, [ebp + 0x10]
push edx
push eax
push dword [ebp - 0x10]
mov dword [ebp + 0x10], eax
push ecx
call edi
mov eax, dword [ebp + 8]
lea ecx, [ebx + 4]
pop edi
add ecx, esi
pop esi
mov dword [eax], ecx
pop ebx
mov esp, ebp
pop ebp
ret