joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100075c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
cmp dword [ecx + 0x38], 0
push ebx
push esi
push edi
mov dword [esp + 0xc], ecx
je 0x100076a6
mov esi, dword [ebp + 0x10]
mov ebx, esi
mov edx, dword [ebp + 0xc]
mov edi, edx
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
test esi, esi
jl 0x10007695
jg 0x10007600
test edx, edx
je 0x10007695
nop dword [eax]
call fcn.10009b70
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x10007654
jg 0x10007617
test esi, esi
je 0x10007654
cmp ebx, eax
jg 0x10007627
jl 0x10007621
cmp edi, esi
jae 0x10007627
mov esi, edi
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
push esi
push eax
mov eax, dword [ecx + 0x20]
push dword [eax]
call fcn.1001cf50
mov ecx, dword [esp + 0x18]
add esp, 0xc
sub edi, esi
sbb ebx, dword [esp + 0x14]
mov eax, dword [ecx + 0x30]
sub dword [eax], esi
mov eax, dword [ecx + 0x20]
add dword [eax], esi
jmp 0x10007679
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov edx, dword [ecx]
movzx eax, byte [eax]
push eax
call dword [edx + 0xc]
cmp eax, 0xffffffff
je 0x1000768f
mov ecx, dword [esp + 0xc]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
add dword [esp + 0x10], esi
test ebx, ebx
jg 0x10007600
jl 0x1000768f
test edi, edi
jne 0x10007600
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
sub edx, edi
mov eax, edx
sbb esi, ebx
mov edx, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ecx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov edx, dword [eax]
lea eax, [ecx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
test edx, edx
je 0x100076ce
mov eax, dword [eax]
mov edx, dword [eax]
jmp 0x100076d4
xor edx, edx
mov dword [esp + 0x18], eax
mov eax, edx
cdq
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
test edi, edi
jl 0x1000773c
jg 0x100076e9
test esi, esi
je 0x1000773c
test edx, edx
jl 0x10007737
jg 0x100076f3
test eax, eax
je 0x10007737
cmp edi, edx
jg 0x10007707
jl 0x100076fd
cmp esi, eax
jae 0x10007707
mov eax, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov ebx, dword [ebp + 8]
push eax
push ebx
push dword [esp + 0x24]
call fcn.1001cf50
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x14]
add ebx, edx
mov ecx, dword [esp + 0xc]
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x10]
sub dword [eax], edx
mov eax, dword [ecx + 0x20]
add dword [eax], edx
jmp 0x1000773f
mov ebx, dword [ebp + 8]
jmp 0x10007749
mov ebx, dword [ebp + 8]
test edi, edi
jl 0x10007762
jg 0x10007749
test esi, esi
je 0x10007762
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x10007762
push eax
push esi
push 1
push ebx
call fcn.10025d52
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10007cb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x1004f004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x10007ce0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x10007d1c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x10007d1c
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x10007e04
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x10007d44
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x10007d77
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.10025088
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
mov edx, dword [ecx]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x1c]
sub eax, 0
je 0x10007dd7
sub eax, 1
je 0x10007dd7
sub eax, 2
jne 0x10007e04
push dword [esi + 0x4c]
movsx eax, byte [ebp - 0x25]
push eax
call fcn.10025088
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10007df4
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.10025d52
add esp, 0x10
cmp edi, eax
jne 0x10007e04
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x10007d07
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret 4
Function at 0x10009850
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x1004f004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x1000990a
cmp byte [esi + 0x3d], 0
je 0x1000990a
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x100098f8
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
mov edx, dword [ecx]
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x100098c0
sub eax, 1
je 0x100098c4
sub eax, 2
jne 0x100098f8
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x100098e1
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.10025d52
add esp, 0x10
cmp edi, eax
jne 0x100098f8
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.1001a4d8
mov esp, ebp
pop ebp
ret

Function at 0x1000ab60
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003c860
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x1004f004]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x10], eax
push 8
mov dword [eax], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.1001a517
mov esi, eax
push 1
mov dword [ebp - 4], 0
call fcn.1001b618
mov dword [esi + 4], eax
add esp, 8
mov eax, dword [ebp - 0x10]
lea edi, [eax + 0x14]
lea ecx, [eax + 0x18]
lea edx, [eax + 0x24]
mov dword [eax + 0x34], esi
lea ebx, [eax + 4]
mov dword [eax + 0xc], ebx
lea esi, [eax + 8]
mov dword [eax + 0x10], esi
mov dword [eax + 0x1c], edi
mov dword [eax + 0x20], ecx
mov dword [eax + 0x2c], edx
add eax, 0x28
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebx + 0x30], eax
mov ebx, dword [ebp - 0x14]
mov dword [esi], 0
mov dword [ecx], 0
mov dword [eax], 0
mov eax, dword [ebp - 0x10]
mov dword [ebx], 0
mov dword [edi], 0
mov dword [edx], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1002c5ff
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1002c475

Function at 0x10039c20
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10039c4d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10039c4d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401578
Capabilities:
Encode data using xor

Disassembly:
call 0x39b94f64
push 0x16437739
out dx, eax
invalid

Function at 0x403474
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
mov ax, 0x616
cmp dword [ebp + 0xc], esp
jl 0x403486
inc ebx
dec edx
dec esi
cmp bh, byte [ebp + 4]
jg 0x4034b8
lea eax, [ecx + 0x10]
dec edx
xchg dword [esp - 0x18], ebx
xchg byte [esp - 0x1c], cl
mov dword [esp - 4], esi
mov byte [esp - 0x1c], bh
inc ebx
lea edx, [eax + 0x14]
mov bx, 0x15a
lea ecx, [esp - 4]
mov dword [esp - 0x18], edx
dec eax
dec esi
inc ecx
lea esi, [ebx + 0xc]
cmp byte [ebp - 0x14], ah
jne 0x4034f4
mov edx, 0x14c
dec ebx
lea eax, [esp + 0x1c]
xchg byte [esp - 0xc], ch
mov bl, byte [esp + 8]
mov ch, byte [esp + 0x18]
xchg dword [esp - 4], edx
inc ecx
mov ebx, 0x352
mov eax, dword [esp - 0x20]
xchg dword [esp - 4], ebx
mov byte [esp - 0x18], dl
lea ecx, [esp - 0x1c]
inc ebx
xchg dword [esp - 0x18], eax
lea eax, [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_GetModuleHandleA
mov dx, 0x69
mov ch, byte [esp - 0x20]
cmp dword [esp - 0x14], esp
jns 0x40352d
mov byte [esp - 0x24], dl
mov cl, byte [esp - 0x18]
mov dword [esp - 0x14], ebx
mov dword [esp - 0xc], edx
mov dword [esp - 0x1c], eax
mov byte [esp - 0x14], ch
xchg byte [esp - 0x28], al
inc edx
inc ecx
lea eax, [esp + 0x24]
dec edx
cmp dword [esp + 0x14], edi
je 0x403550
xchg dword [esp - 0x20], ebx
inc ecx
dec esi
mov ch, byte [esp - 0x18]
inc edx
lea edx, [eax + 0x10]
lea edx, [ecx + 4]
inc ecx
lea ebx, [ecx + 8]
xchg byte [esp - 4], bl
xchg dword [esp - 0xc], ebx
mov byte [esp - 0x20], ch
xchg byte [esp - 8], dh
xchg byte [esp - 0xc], bh
mov eax, 0xb6
mov dh, byte [esp + 0x18]
mov esi, dword [esp - 0x1c]
dec edx
dec ebx
lea esi, [ebx + 0x14]
cmp word [ebp - 0x14], 0x7d6
ja 0x40358e
push 0
call sub.KERNEL32.DLL_CreateThread
mov esp, ebp
pop ebp
ret
Function at 0x10001740
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
xor eax, eax
cmp byte [ebp + 0xc], al
push ebx
setne al
xor edx, edx
mov dword [ebp - 0x10], edx
push esi
mov esi, dword [ebp + 8]
test eax, eax
jne 0x10001760
xor al, al
jmp 0x1000177c
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebp - 0x10]
test eax, eax
setne al
mov byte [ebp - 4], al
mov bl, byte [esi]
test al, al
je 0x1000179a
mov ecx, dword [ebp - 8]
lea eax, [ebp + 0xc]
push eax
push ecx
push dword [ebp - 0xc]
mov dword [ebp + 0xc], ecx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x100017b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
movzx eax, byte [ebp + 0xc]
mov edx, 0
neg eax
mov dword [ebp - 0x10], edx
push esi
mov esi, dword [ebp + 8]
sbb eax, eax
and eax, 2
jne 0x100017d3
xor al, al
jmp 0x100017ef
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebp - 0x10]
test eax, eax
setne al
mov byte [ebp - 4], al
movzx esi, word [esi]
test al, al
je 0x1000180e
mov ecx, dword [ebp - 8]
lea eax, [ebp + 0xc]
push eax
push ecx
push dword [ebp - 0xc]
mov dword [ebp + 0xc], ecx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ax, si
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x10001820
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
movzx eax, byte [ebp + 0xc]
mov edx, 0
neg eax
mov dword [ebp - 0x10], edx
push esi
mov esi, dword [ebp + 8]
sbb eax, eax
and eax, 4
jne 0x10001843
xor al, al
jmp 0x1000185f
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebp - 0x10]
test eax, eax
setne al
mov byte [ebp - 4], al
mov esi, dword [esi]
test al, al
je 0x1000187d
mov ecx, dword [ebp - 8]
lea eax, [ebp + 0xc]
push eax
push ecx
push dword [ebp - 0xc]
mov dword [ebp + 0xc], ecx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x10001890
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
xor eax, eax
mov dword [ebp - 0x10], 0
cmp byte [ebp + 0x10], al
push esi
mov esi, dword [ebp + 8]
setne al
test eax, eax
jne 0x100018b2
mov byte [ebp - 4], al
jmp 0x100018cc
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
setne byte [ebp - 4]
mov al, byte [ebp + 0xc]
mov byte [esi], al
cmp byte [ebp - 4], 0
je 0x100018ee
mov eax, dword [ebp - 8]
lea ecx, [ebp + 0x10]
push ecx
push eax
push dword [ebp - 0xc]
mov dword [ebp + 0x10], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10003e20
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0xc]
xor ecx, ecx
cmp byte [ebp + 0x10], cl
push ebx
setne cl
xor edx, edx
mov dword [ebp - 0x14], edx
push esi
mov esi, eax
test ecx, ecx
jne 0x10003e42
xor cl, cl
jmp 0x10003e61
lea edx, [ebp - 0xc]
mov dword [ebp - 0x10], ecx
push edx
push 0x40
push ecx
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebp - 0x14]
test eax, eax
mov eax, dword [ebp + 0xc]
setne cl
mov byte [ebp - 8], cl
mov bl, byte [esi]
test cl, cl
je 0x10003e82
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 dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp + 0xc]
cmp bl, 0xe8
jb 0x10003eec
cmp bl, 0xe9
jbe 0x10003ecc
cmp bl, 0xff
jne 0x10003eec
mov esi, dword [ebp + 0x10]
inc eax
push esi
push ecx
mov ecx, esp
mov dword [ecx], eax
call fcn.10001740
add esp, 8
cmp al, 0x15
je 0x10003eab
cmp al, 0x25
jne 0x10003eec
mov eax, dword [ebp + 0xc]
push esi
push ecx
mov ecx, esp
add eax, 2
mov dword [ecx], eax
call fcn.10001820
add esp, 8
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
inc eax
push esi
mov esi, dword [ebp + 8]
push 4
push ecx
mov ecx, esp
push esi
mov dword [ecx], eax
call fcn.10004400
add esp, 0x10
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
pop esi
pop ebx
mov dword [eax], 0
mov esp, ebp
pop ebp
ret

Function at 0x10003fe0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push ebx
push ecx
mov ecx, esp
push dword [ebp + 8]
mov dword [ecx], eax
call fcn.10003e20
mov esi, dword [ebp + 0xc]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x10], 0
test bl, bl
setne al
test eax, eax
jne 0x10004019
mov byte [ebp - 4], al
jmp 0x10004033
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
setne byte [ebp - 4]
mov byte [esi], 0xe8
cmp byte [ebp - 4], 0
je 0x10004053
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]
push ebx
push 4
push ecx
mov ecx, dword [ebp + 0x10]
mov edx, esp
push ecx
mov dword [edx], ecx
mov edx, esp
mov ecx, dword [ebp + 0xc]
inc ecx
mov dword [edx], ecx
call fcn.10004080
mov eax, dword [ebp + 8]
add esp, 0x10
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10004080
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub eax, 1
je 0x100040ae
sub eax, 1
je 0x100040ca
sub eax, 2
je 0x1000412c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x14]
lea eax, [ecx + 1]
sub edx, eax
push edx
push ecx
mov eax, esp
mov dword [eax], ecx
call fcn.10001890
add esp, 0xc
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x10], 0
lea eax, [esi + ebx]
sub ecx, eax
movzx eax, cx
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x14]
movzx eax, al
neg eax
sbb eax, eax
and eax, 2
jne 0x100040f7
mov byte [ebp - 4], 0
jmp 0x1000410d
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x10], esi
call edi
test eax, eax
setne byte [ebp - 4]
mov eax, dword [ebp + 0x10]
mov word [esi], ax
cmp byte [ebp - 4], 0
je 0x1000412c
mov eax, dword [ebp - 8]
lea ecx, [ebp + 0x10]
push ecx
push eax
push dword [ebp - 0xc]
mov dword [ebp + 0x10], eax
push dword [ebp - 0x10]
call edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x10], 0
lea eax, [esi + ebx]
mov ebx, dword [ebp + 0xc]
sub ebx, eax
mov eax, dword [ebp + 0x14]
movzx eax, al
neg eax
sbb eax, eax
and eax, 4
jne 0x10004153
mov byte [ebp - 4], 0
jmp 0x10004169
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x10], esi
call edi
test eax, eax
setne byte [ebp - 4]
mov dword [esi], ebx
cmp byte [ebp - 4], 0
je 0x10004184
mov eax, dword [ebp - 8]
lea ecx, [ebp + 0x10]
push ecx
push eax
push dword [ebp - 0xc]
mov dword [ebp + 0x10], eax
push dword [ebp - 0x10]
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10004380
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
movzx ecx, byte [ebp + 0x14]
neg ecx
push ebx
push esi
sbb ecx, ecx
mov esi, 0
mov dword [ebp - 0x10], esi
and ecx, dword [ebp + 0x10]
jne 0x100043a1
xor bl, bl
jmp 0x100043c0
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.10010f20
add esp, 0xc
test bl, bl
je 0x100043ed
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 0x10004600
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
movzx ecx, byte [ebp + 0x14]
neg ecx
mov dword [ebp - 0x10], 0
sbb ecx, ecx
and ecx, dword [ebp + 0x10]
jne 0x10004620
mov byte [ebp - 4], 0
jmp 0x1000463d
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.10010f20
add esp, 0xc
cmp byte [ebp - 4], 0
je 0x1000466b
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 0x10007ba0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push esi
push dword [ebp + 0x10]
push 1
push ecx
mov edx, esp
mov dword [edx], eax
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, dword [ebp + 8]
xor eax, eax
cmp byte [ebp + 0x10], al
mov dword [ebp - 0x10], 0
setne al
test eax, eax
jne 0x10007bd4
mov byte [ebp - 4], al
jmp 0x10007bee
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
setne byte [ebp - 4]
mov al, byte [ebp + 0xc]
mov byte [esi], al
cmp byte [ebp - 4], 0
je 0x10007c10
mov eax, dword [ebp - 8]
lea ecx, [ebp + 0xc]
push ecx
push eax
push dword [ebp - 0xc]
mov dword [ebp + 0xc], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x1315616a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x13184340]
jne 0x13156174
repz ret
jmp fcn.13156718

Function at 0x131579b4
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x13184390]
je 0x131579cf
inc edi
cmp edi, 0x17
jb 0x131579c0
cmp edi, 0x17
jae 0x13157b4f
push ebp
push 3
call fcn.1315b045
cmp eax, 1
pop ecx
je 0x13157b1b
push 3
call fcn.1315b045
test eax, eax
pop ecx
jne 0x13157a03
cmp dword [0x13184350], 1
je 0x13157b1b
cmp ebx, 0xfc
je 0x13157b4e
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x13185748
push ebp
call fcn.1315a00b
add esp, 0xc
test eax, eax
je 0x13157a39
push esi
push esi
push esi
push esi
push esi
call fcn.131597ea
add esp, 0x14
push 0x104
mov esi, 0x13185761
push esi
push 0
mov byte [0x13185865], 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x13157a7d
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.1315a00b
add esp, 0xc
test eax, eax
je 0x13157a7d
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.131597ea
add esp, 0x14
push esi
call fcn.13159f80
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x13157ac2
push esi
call fcn.13159f80
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x13185a5c
push 0x131608bc
sub ecx, eax
push ecx
push eax
call fcn.1315af92
add esp, 0x14
test eax, eax
je 0x13157ac2
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.131597ea
add esp, 0x14
jmp 0x13157ac4
xor esi, esi
push 0x131608b8
push ebx
push ebp
call fcn.1315af21
add esp, 0xc
test eax, eax
je 0x13157ae4
push esi
push esi
push esi
push esi
push esi
call fcn.131597ea
add esp, 0x14
push dword [edi*8 + 0x13184394]
push ebx
push ebp
call fcn.1315af21
add esp, 0xc
test eax, eax
je 0x13157b06
push esi
push esi
push esi
push esi
push esi
call fcn.131597ea
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.1315ad64
add esp, 0xc
jmp 0x13157b4e
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x13157b4e
cmp ebp, 0xffffffff
je 0x13157b4e
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x13184394]
push dword [esi]
call fcn.13159f80
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.DLL_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret