joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100029b0
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10039498
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x100459c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x30]
xor ebx, ebx
cmp byte [eax + 0x34], 1
mov dword [ebp - 0x34], edi
jne 0x100029fb
cmp byte [ecx + 0x24], bl
je 0x10002a04
mov edx, dword [eax + 0x28]
cmp byte [edx + 0x24], bl
jmp 0x100029fe
cmp byte [ecx + 0x24], bl
jne 0x10002b32
mov ecx, dword [eax + 0x30]
cmp byte [ecx + 0x24], 1
je 0x10002a24
mov dword [ecx + 0x28], 0x3e8
mov eax, dword [eax + 0x28]
cmp byte [eax + 0x24], 1
je 0x10002a24
mov dword [eax + 0x28], 0xffffffff
mov dword [ebp - 0x30], ebx
jmp 0x10002a30
mov edx, dword [0x10048754]
add edx, 4
push edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x10048754]
mov esi, dword [0x1004c20c]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp esi, ebx
je 0x10002afd
xor ecx, ecx
push 0x26
mov word [ebp - 0x2c], cx
push str.AD1784A3_1BD7_4828_930A_595592349F9E
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
call fcn.100018c0
mov dword [ebp - 4], ebx
mov edi, dword [edi + 4]
cmp byte [edi + 0x34], 1
mov ecx, dword [edi + 0x30]
jne 0x10002a9a
cmp byte [ecx + 0x24], 0
je 0x10002aa0
mov edx, dword [edi + 0x28]
cmp byte [edx + 0x24], 0
jmp 0x10002a9e
cmp byte [ecx + 0x24], 0
jne 0x10002ac6
lea edx, [ebp - 0x2c]
call fcn.1000dc30
test al, al
je 0x10002ac8
cmp byte [edi + 0x34], 0
je 0x10002ac6
mov ecx, edi
call fcn.1000c960
test al, al
jne 0x10002ac6
call fcn.1000c850
xor al, al
jmp 0x10002ac8
mov al, 1
test al, al
sete bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x18], 8
jb 0x10002ae6
mov eax, dword [ebp - 0x2c]
push eax
call fcn.100223c1
add esp, 4
test bl, bl
je 0x10002b0d
cmp dword [ebp - 0x30], 0x64
je 0x10002b2b
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [ebp - 0x34]
xor ebx, ebx
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
cmp eax, 0x64
jle 0x10002a30
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100223cc
mov esp, ebp
pop ebp
ret
mov eax, 0x2001
jmp 0x10002b0f
mov eax, 0x2003
jmp 0x10002b0f
Function at 0x10002f00
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100395e4
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x100459c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [edi], vtable.ixcNpacr.0
mov dword [ebp - 4], 5
mov esi, dword [0x10048720]
mov ebx, dword [0x1004870c]
mov eax, ebx
cmp esi, 8
jae 0x10002f52
mov eax, 0x1004870c
mov ecx, 0x1003ec60
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10002f7d
test dx, dx
je 0x10002f79
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10002f7d
add eax, 4
add ecx, 4
test dx, dx
jne 0x10002f57
xor eax, eax
jmp 0x10002f82
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10003011
mov eax, ebx
cmp esi, 8
jae 0x10002f96
mov eax, 0x1004870c
mov ecx, str.npamgr_64.exe
jmp 0x10002fa0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10002fc6
test dx, dx
je 0x10002fc2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10002fc6
add eax, 4
add ecx, 4
test dx, dx
jne 0x10002fa0
xor eax, eax
jmp 0x10002fcb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10003011
mov eax, dword [edi + 0x50]
test eax, eax
je 0x1000300a
lea ecx, [ebp - 0x10]
push ecx
push eax
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 0x10], 0x103
jne 0x10003000
mov edx, dword [edi + 0x50]
push 0x103
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [edi + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
call fcn.10003180
mov byte [ebp - 4], 4
mov ecx, dword [edi + 0x78]
mov ebx, vtable.ix::cmn::ixcCriticalSection.0
mov dword [edi + 0x74], ebx
test ecx, ecx
je 0x10003033
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [edi + 0x78], 0
lea esi, [edi + 0x58]
call fcn.10003d10
mov eax, dword [esi]
push eax
call fcn.100223c1
mov dword [esi], 0
mov byte [ebp - 4], 2
mov dword [edi + 0x44], vtable.ixcDataSeg.0
mov ecx, dword [edi + 0x4c]
add esp, 4
mov dword [edi + 0x48], ebx
test ecx, ecx
je 0x10003070
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [edi + 0x4c], 0
mov dword [edi + 0x30], vtable.ixcHookGDX.0
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [edi + 0x24]
push ecx
mov byte [ebp - 4], 0
call fcn.100028a0
cmp dword [edi + 0x18], 8
jb 0x1000309c
mov edx, dword [edi + 4]
push edx
call fcn.100223c1
add esp, 4
xor eax, eax
mov dword [edi + 0x18], 7
mov dword [edi + 0x14], 0
mov word [edi + 4], ax
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 0x10003940
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10039578
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x100459c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
cmp dword [0x10048758], 0
jne 0x100039bd
mov eax, dword [0x10048754]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x10048754]
mov esi, dword [0x1004c210]
add ecx, 4
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x100039b4
push esi
push esi
push esi
push 0x10003620
push esi
push esi
call fcn.10022d28
add esp, 0x18
mov dword [0x10048758], eax
cmp dword [0x10048758], 0
je 0x100039ed
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x10], esp
xor edx, edx
push 0xffffffffffffffff
push edx
lea eax, [ebp + 0xc]
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], dx
call fcn.10001530
mov ecx, dword [ebp + 8]
push ecx
call fcn.100037a0
cmp dword [ebp + 0x20], 8
jb 0x100039ff
mov edx, dword [ebp + 0xc]
push edx
call fcn.100223c1
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 0x20
Function at 0x1000de60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
xor esi, esi
cmp eax, esi
je 0x1000df6d
cmp byte [ebx + 0x24], 0
je 0x1000df6d
mov ecx, dword [ebp + 8]
push edi
mov edi, dword [ecx]
mov dword [ebp - 8], esi
mov dword [ebp - 4], eax
cmp edi, esi
jbe 0x1000df5d
nop
mov ecx, dword [ebx + 4]
lea eax, [ebx + 0x38]
push eax
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x1000df0e
cmp eax, 0x3e5
jne 0x1000df3e
mov edx, dword [ebx + 0x28]
mov eax, dword [ebx + 0x48]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1000df3e
mov edx, dword [ebx + 4]
push 1
lea ecx, [ebp - 8]
push ecx
lea eax, [ebx + 0x38]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov esi, eax
mov eax, dword [ebx + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp esi, 1
je 0x1000df50
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x1000df5d
mov eax, dword [ebp - 8]
add dword [ebp - 4], eax
sub edi, eax
jmp 0x1000df1d
mov ecx, dword [ebp - 8]
sub edi, ecx
cmp eax, 0xea
jne 0x1000df58
add dword [ebp - 4], ecx
mov esi, 1
test edi, edi
jne 0x1000de90
mov eax, dword [ebp + 8]
sub dword [eax], edi
xor eax, eax
cmp esi, esi
pop edi
sete al
pop esi
mov esp, ebp
pop ebp
ret 4
xor esi, esi
xor eax, eax
cmp esi, 1
pop edi
sete al
pop esi
mov esp, ebp
pop ebp
ret 4
sub edi, dword [ebp - 8]
mov esi, 1
mov eax, dword [ebp + 8]
sub dword [eax], edi
xor eax, eax
cmp esi, 1
pop edi
sete al
pop esi
mov esp, ebp
pop ebp
ret 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x1000df80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
test eax, eax
je 0x1000e019
cmp byte [esi + 0x24], 0
je 0x1000e019
mov edx, dword [ebp + 8]
push ebx
push edi
lea edi, [esi + 0x4c]
push edi
lea ecx, [ebp - 4]
push ecx
push edx
push eax
mov eax, dword [esi + 4]
push eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x1000dfc9
cmp eax, 0x3e5
jne 0x1000dffc
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x5c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1000dffc
mov ecx, dword [esi + 4]
push 1
lea eax, [ebp - 4]
push eax
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov edx, dword [esi + 0x5c]
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test edi, edi
jne 0x1000e006
pop edi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ebp - 4], ecx
pop edi
sete al
pop ebx
mov esp, ebp
pop ebp
ret 4
xor al, al
mov esp, ebp
pop ebp
ret 4
Function at 0x10020e4b
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
xor edi, edi
cmp dword [0x10047888], edi
je 0x10020e62
xor eax, eax
jmp 0x10020ff5
mov eax, dword [0x10047884]
cmp eax, edi
jne 0x10020ff5
push ebx
push 0x24
push edi
mov ebx, 0x10047860
push ebx
call fcn.10024ac0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push str.dbghelp.dll
mov dword [0x10047860], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, edi
mov dword [0x10047864], eax
je 0x10020fb3
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ImagehlpApiVersionEx
push eax
call esi
push str.SymInitialize
push dword [0x10047864]
mov dword [0x10047868], eax
call esi
push str.SymSetOptions
push dword [0x10047864]
mov dword [0x1004786c], eax
call esi
push str.SymGetOptions
push dword [0x10047864]
mov dword [0x10047870], eax
call esi
push str.SymLoadModule64
push dword [0x10047864]
mov dword [0x10047874], eax
call esi
push str.SymGetModuleInfo64
push dword [0x10047864]
mov dword [0x10047878], eax
call esi
push str.SymFromName
push dword [0x10047864]
mov dword [0x1004787c], eax
call esi
push 8
mov dword [0x10047880], eax
lea eax, [ebp - 8]
push edi
push eax
call fcn.10024ac0
mov eax, dword [0x10047868]
add esp, 0xc
cmp eax, edi
mov word [ebp - 8], 9
pop esi
je 0x10020fae
cmp dword [0x1004786c], edi
je 0x10020fae
cmp dword [0x10047878], edi
je 0x10020fae
cmp dword [0x1004787c], edi
je 0x10020fae
cmp dword [0x10047880], edi
je 0x10020fae
lea ecx, [ebp - 8]
push ecx
call eax
cmp word [ebp - 8], 9
jb 0x10020fae
push edi
push edi
push dword [0x10047860]
call dword [0x1004786c]
test eax, eax
je 0x10020fae
mov eax, dword [0x10047874]
cmp eax, edi
je 0x10020fa4
cmp dword [0x10047870], edi
je 0x10020fa4
call eax
and eax, 0xfffffffc
or eax, 0x2704
push eax
call dword [0x10047870]
mov dword [0x10047884], ebx
mov eax, ebx
jmp 0x10020ff4
mov eax, dword [0x10047864]
cmp eax, edi
mov dword [0x10047888], 1
je 0x10020fc8
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x10047868], edi
mov dword [0x1004786c], edi
mov dword [0x10047870], edi
mov dword [0x10047874], edi
mov dword [0x10047878], edi
mov dword [0x1004787c], edi
mov dword [0x10047880], edi
xor eax, eax
pop ebx
pop edi
leave
ret

Function at 0x10020ff8
Capabilities:
Parse pe header

Disassembly:
push 0x24
push 0x10042180
call fcn.10028fa0
mov eax, dword [ebp + 8]
test eax, eax
mov esi, 0x10000
je 0x10021016
lea esi, [eax + 0x10000]
push 0x1c
push 0
lea eax, [ebp - 0x34]
push eax
call fcn.10024ac0
add esp, 0xc
push 0xfffffffffffffffe
pop edi
push 0x1c
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jbe 0x1002108c
cmp dword [ebp - 0x24], 0x1000
jne 0x10021059
test word [ebp - 0x20], 0x100
jne 0x10021059
and dword [ebp - 4], 0
cmp word [esi], 0x5a4d
je 0x10021064
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x34]
lea esi, [eax + ecx]
jmp 0x10021029
mov eax, dword [esi + 0x3c]
add eax, esi
cmp dword [eax], 0x4550
jne 0x10021056
mov dword [ebp - 4], edi
mov eax, esi
call fcn.10028fe5
ret 4
xor eax, eax
jmp 0x10021076
Function at 0x10021090
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x100421a0
call fcn.10028fa0
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
xor edi, edi
cmp eax, edi
jne 0x100210b2
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp + 8], eax
mov dword [ebp - 4], edi
cmp word [eax], 0x5a4d
je 0x100210c6
push 0xc1
jmp 0x10021162
mov esi, dword [eax + 0x3c]
add esi, eax
cmp dword [esi], 0x4550
je 0x100210dd
push 0xbf
jmp 0x10021162
movzx eax, word [esi + 0x14]
cmp ax, di
je 0x1002115d
movzx eax, ax
lea ebx, [eax + esi + 0x18]
mov dword [ebp - 0x1c], edi
movzx eax, word [esi + 6]
cmp dword [ebp - 0x1c], eax
jae 0x1002115d
mov eax, dword [ebp - 0x1c]
imul eax, eax, 0x28
lea edi, [eax + ebx]
push str..detour
push edi
call fcn.10024b40
pop ecx
pop ecx
test eax, eax
jne 0x10021151
mov eax, dword [edi + 0xc]
xor ecx, ecx
cmp eax, ecx
je 0x1002115d
cmp dword [edi + 0x10], ecx
je 0x1002115d
mov edx, dword [ebp + 8]
lea esi, [eax + edx]
mov eax, dword [esi]
cmp eax, 0x40
jb 0x1002115d
cmp dword [esi + 4], 0x727444
jne 0x1002115d
cmp dword [esi + 8], ecx
jne 0x1002113f
mov dword [esi + 8], eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
jmp 0x10021171
inc dword [ebp - 0x1c]
jmp 0x100210f0
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
call fcn.10028fe5
ret 4

Function at 0x10021275
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [ebp + 8]
mov eax, 0x150
cmp dword [esi], eax
jne 0x10021354
cmp dword [ebp + 0xc], eax
jb 0x10021354
and dword [ebp - 4], 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp + 0xc]
push eax
push 0x40
push 0x40
push dword [esi + 4]
call edi
test eax, eax
je 0x1002134e
push ebx
lea eax, [ebp - 8]
push eax
push 0x40
mov ebx, 0xf8
push ebx
push dword [esi + 8]
call edi
test eax, eax
je 0x1002133f
mov eax, dword [esi + 0xc]
test eax, eax
je 0x100212e1
lea ecx, [ebp - 0xc]
push ecx
push 0x40
push 4
push eax
call edi
test eax, eax
je 0x10021332
push 0x40
lea eax, [esi + 0x14]
push eax
push dword [esi + 4]
call fcn.10023110
push ebx
lea eax, [esi + 0x54]
push eax
push dword [esi + 8]
call fcn.10023110
mov eax, dword [esi + 0xc]
add esp, 0x18
test eax, eax
je 0x10021318
push 4
lea ecx, [esi + 0x14c]
push ecx
push eax
call fcn.10023110
add esp, 0xc
mov eax, dword [esi + 0xc]
test eax, eax
mov dword [ebp - 4], 1
je 0x10021332
lea ecx, [ebp + 8]
push ecx
push dword [ebp + 0xc]
push 4
push eax
call edi
lea eax, [ebp + 8]
push eax
push dword [ebp - 8]
push ebx
push dword [esi + 8]
call edi
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
push 0x40
push dword [esi + 4]
call edi
pop ebx
mov eax, dword [ebp - 4]
pop edi
jmp 0x10021361
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
leave
ret 8
Function at 0x10021522
Capabilities:
Parse pe header

Disassembly:
push 0x24
push 0x100421e0
call fcn.10028fa0
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
and dword [ebp - 4], 0
mov edx, dword [ebp - 0x30]
cmp word [edx], 0x5a4d
jne 0x10021587
mov eax, dword [edx + 0x3c]
add eax, edx
cmp dword [eax], 0x4550
jne 0x10021587
mov ecx, dword [eax + 0xd8]
lea esi, [ecx + edx]
cmp dword [ebp + 0xc], esi
jb 0x10021587
mov eax, dword [eax + 0xdc]
add eax, ecx
add eax, edx
cmp dword [ebp + 0xc], eax
jae 0x10021587
mov dword [ebp - 4], 0xfffffffe
mov al, 1
jmp 0x10021590
mov dword [ebp - 4], 0xfffffffe
xor al, al
call fcn.10028fe5
ret
Function at 0x10021688
Capabilities:
Allocate or change rwx memory
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
mov esi, eax
cmp esi, 0x7ff80000
push edi
mov ebx, 0x10000
jbe 0x100216ab
lea eax, [esi - 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x100216ae
mov dword [ebp - 4], ebx
cmp esi, 0x80000000
jae 0x100216c1
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 8], eax
jmp 0x100216c8
mov dword [ebp - 8], 0xfff80000
mov eax, dword [0x10047890]
test eax, eax
mov ecx, dword [0x1004788c]
jne 0x100216e2
test ecx, ecx
je 0x100216f7
mov eax, ecx
mov dword [0x10047890], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x100216f7
cmp edx, dword [ebp - 4]
jb 0x100216f7
cmp edx, dword [ebp - 8]
jbe 0x100217c8
mov eax, ecx
test ecx, ecx
jmp 0x1002171b
test eax, eax
je 0x10021716
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x10021716
cmp ecx, dword [ebp - 4]
jb 0x10021716
cmp ecx, dword [ebp - 8]
jbe 0x100217c8
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x10047890], eax
jne 0x100216fd
mov eax, esi
and eax, 0xffff
sub esi, eax
cmp esi, dword [ebp - 4]
mov edi, esi
jbe 0x1002185d
lea eax, [edi - 0x70000000]
cmp eax, 0x10000000
ja 0x10021748
mov edi, 0x6fff0000
push 0x1c
lea eax, [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1002185d
cmp dword [ebp - 0x30], ebx
jne 0x10021767
cmp dword [ebp - 0x34], ebx
jae 0x1002177a
mov edi, dword [ebp - 0x3c]
add edi, 0xffff0000
cmp edi, dword [ebp - 4]
ja 0x10021736
jmp 0x1002185d
push 0x40
push 0x3000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x10047890], eax
je 0x1002185d
mov ecx, dword [0x1004788c]
xor edx, edx
mov dword [eax + 4], ecx
mov dword [eax], 0x52727464
mov dword [eax + 8], edx
mov dword [0x1004788c], eax
lea ecx, [eax + 0xffe0]
mov esi, 0x7fd
mov dword [ecx + 0x18], edx
mov edx, ecx
sub ecx, 0x20
dec esi
jne 0x100217ba
mov dword [eax + 8], edx
mov esi, dword [eax + 8]
cmp esi, dword [ebp - 4]
jb 0x10021862
cmp esi, dword [ebp - 8]
ja 0x10021862
mov ecx, dword [esi + 0x18]
push 0x20
push 0xcc
push esi
mov dword [eax + 8], ecx
call fcn.10024ac0
add esp, 0xc
mov eax, esi
jmp 0x10021864
lea eax, [esi - 0x70000000]
cmp eax, 0x10000000
ja 0x10021809
mov esi, 0x80010000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10021862
cmp dword [ebp - 0x14], ebx
jne 0x10021854
cmp dword [ebp - 0x18], ebx
jb 0x10021854
movzx ecx, si
test ecx, ecx
je 0x10021838
mov eax, ebx
sub eax, ecx
sub dword [ebp - 0x18], eax
add dword [ebp - 0x24], eax
mov esi, dword [ebp - 0x24]
push 0x40
push 0x3000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x10047890], eax
jne 0x10021796
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
lea esi, [eax + ecx]
cmp esi, dword [ebp - 8]
jb 0x100217f7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1002188a
Capabilities:
Parse pe header

Disassembly:
push 0x24
push 0x10042200
call fcn.10028fa0
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x100218e2
and dword [ebp - 4], 0
mov eax, dword [ebp - 0x30]
cmp word [eax], 0x5a4d
jne 0x100218db
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x100218db
cmp word [ecx + 0x14], 0
je 0x100218db
mov dword [ebp - 4], 0xfffffffe
jmp 0x100218e4
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
call fcn.10028fe5
ret

Function at 0x100218fc
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push edi
xor edi, edi
cmp dword [0x10047898], edi
je 0x1002190f
mov eax, 0x10dd
jmp 0x1002196a
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x10047898
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x10021908
push esi
mov esi, dword [0x1004788c]
mov dword [0x10047894], edi
mov dword [0x100478a8], edi
mov dword [0x100478a4], edi
mov dword [0x1004789c], edi
mov dword [0x100478a0], edi
jmp 0x10021963
lea eax, [esp + 8]
push eax
push 0x40
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [esi + 4]
cmp esi, edi
jne 0x1002194d
xor eax, eax
pop esi
pop edi
pop ecx
ret

Function at 0x1002196d
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x10047898], eax
je 0x10021983
mov eax, 0x10dd
pop ecx
ret
push ebx
push esi
mov esi, dword [0x100478a8]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x100219ce
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi + 4], ebx
jne 0x100219bf
mov edi, dword [esi + 0x10]
cmp edi, ebx
je 0x100219bf
call fcn.10021869
mov dword [esi + 0x10], ebx
mov edi, dword [esi]
push esi
call fcn.100223c1
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x10021992
mov dword [0x100478a8], ebx
call fcn.10021661
mov esi, dword [0x100478a4]
cmp esi, ebx
je 0x100219fb
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi]
push esi
call fcn.100223c1
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x100219e3
pop edi
pop esi
mov dword [0x100478a4], ebx
mov dword [0x10047898], ebx
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x10021c52
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x1004789c]
test eax, eax
jne 0x10021cc2
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 8]
cmp edi, eax
jne 0x10021c6e
xor eax, eax
jmp 0x10021cc1
push esi
push 8
call fcn.10022670
mov esi, eax
test esi, esi
pop ecx
jne 0x10021c82
push 8
pop edi
jmp 0x10021c9d
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x10021cae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call fcn.100223c1
pop ecx
and dword [0x100478a0], 0
mov dword [0x1004789c], edi
mov eax, edi
jmp 0x10021cc0
mov eax, dword [0x100478a4]
mov dword [esi], eax
mov dword [esi + 4], edi
mov dword [0x100478a4], esi
xor eax, eax
pop esi
pop edi
ret 4