joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10127660
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x1014a018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x11920e6c]
push ebx
push esi
push edi
mov dword [ebp - 0x138], eax
cmp eax, dword [0x11920e70]
je 0x10127827
mov edi, dword [ebp - 0x134]
lea esi, [eax + 1]
xor ebx, ebx
jmp 0x101276a0
movzx eax, byte [eax]
cmp eax, 3
ja case.default.0x101276ac
jmp dword [eax*4 + 0x10127838]
push esi
push ebx
call dword [sym.imp.USER32.dll_FindWindowA]
mov edi, eax
cmp edi, ebx
je case.default.0x101276ac
lea ecx, [ebp - 0x134]
push ecx
push edi
mov dword [ebp - 0x134], ebx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edx, dword [ebp - 0x134]
mov eax, dword [ebp - 0x138]
push edx
inc eax
push eax
jmp 0x1012781d
push ebx
push esi
push ebx
push ebx
call dword [sym.imp.USER32.dll_FindWindowExA]
mov edi, eax
cmp edi, ebx
jne 0x101276c5
jmp case.default.0x101276ac
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
lea ecx, [ebp - 0x130]
push ecx
push eax
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x130], 0x128
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x101277c6
mov ecx, esi
lea eax, [ebp - 0x10c]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10127760
cmp dl, bl
je 0x1012775c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10127760
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x10127740
xor eax, eax
jmp 0x10127765
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x101277aa
mov edx, dword [ebp - 0x128]
push edx
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea eax, [ebp - 0x13c]
push eax
push edi
mov dword [ebp - 0x13c], ebx
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ecx, dword [ebp - 0x13c]
push ecx
push esi
push 8
call fcn.10121370
add esp, 0xc
mov eax, dword [ebp - 0x134]
lea edx, [ebp - 0x130]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
jne 0x10127731
mov eax, dword [ebp - 0x134]
cmp eax, 0xffffffff
je case.default.0x101276ac
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp case.default.0x101276ac
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x10127814
mov eax, dword [ebp - 0x138]
add eax, 0x41
add esi, 0x41
mov dword [ebp - 0x138], eax
cmp eax, dword [0x11920e70]
jne 0x101276a0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1012db16
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x138]
push ebx
inc ecx
push ecx
push 8
call fcn.10121370
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1012db16
mov esp, ebp
pop ebp
ret
Function at 0x101279d0
Capabilities:
Check for time delay via gettickcount

Disassembly:
cmp byte [0x11920dec], 0
push esi
je 0x10127a40
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x11920df0]
cmp eax, 0x1388
jbe 0x10127a40
push 0x11920e1c
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
test eax, eax
je 0x10127a40
call fcn.1011fd70
call esi
mov dword [0x11920df0], eax
test eax, eax
je 0x10127a35
call fcn.10127920
test al, al
jne 0x10127a35
push 0x1388
xor ecx, ecx
call fcn.10122b60
push eax
push 2
mov esi, 0x108bc768
call fcn.1011f340
add esp, 0xc
pop esi
ret
push 0x11920e1c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
ret

Function at 0x10127ad0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x1014a018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x108c19e0]
push ebx
push esi
push edi
test eax, eax
js 0x10127bdd
cmp eax, 1
jge 0x10127bdd
mov esi, eax
imul esi, esi, 0x214
add esi, 0x108c17cc
push str.Logs
inc eax
lea ebx, [esi + 4]
push 0x100
mov dword [0x108c19e0], eax
push ebx
mov dword [esi], 1
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
cmp dword [esi], 0
je 0x10127bdd
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0xe]
movzx ecx, word [ebp - 0x12]
movzx edx, word [ebp - 0x14]
push eax
push ecx
push edx
push ebx
lea edi, [esi + 0x110]
push str.._s_04d__02d__02d.log
push edi
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ecx
mov dword [esi + 0x10c], edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
jne 0x10127bb8
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1012db16
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10127bdd
mov ecx, dword [esi + 0x210]
push ecx
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1012db16
mov esp, ebp
pop ebp
ret
Function at 0x10127bf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x1014a018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
test eax, eax
js 0x10127de7
cmp eax, dword [ecx + 0x218]
jge 0x10127de7
imul eax, eax, 0x214
cmp dword [eax + ecx + 4], 0
lea esi, [eax + ecx + 4]
je 0x10127de7
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x812]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
cmp ecx, dword [esi + 0x104]
jne 0x10127c76
movzx edx, word [ebp - 0x816]
cmp edx, dword [esi + 0x108]
jne 0x10127c76
movzx eax, word [ebp - 0x818]
cmp eax, dword [esi + 0x10c]
je 0x10127d33
mov ecx, dword [esi + 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [ebp - 0x812]
movzx ecx, word [ebp - 0x816]
movzx edx, word [ebp - 0x818]
push eax
push ecx
push edx
mov dword [esi + 0x10c], edx
lea edx, [esi + 4]
push edx
lea edi, [esi + 0x110]
push str.._s_04d__02d__02d.log
push edi
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ecx
call ebx
add esp, 0x18
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
jne 0x10127cfd
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1012db16
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10127d33
mov eax, dword [esi + 0x210]
push eax
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1012db16
mov esp, ebp
pop ebp
ret
push 0x3ff
lea ecx, [ebp - 0x807]
push 0
push ecx
mov byte [ebp - 0x808], 0
call sub.MSVCR100.dll_memset
mov eax, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
push edx
push eax
lea ecx, [ebp - 0x808]
push 0x400
push ecx
call dword [sym.imp.MSVCR100.dll_vsprintf_s]
push 0x3ff
lea edx, [ebp - 0x407]
push 0
push edx
mov byte [ebp - 0x408], 0
call sub.MSVCR100.dll_memset
movzx ecx, word [ebp - 0x80c]
movzx edx, word [ebp - 0x80e]
lea eax, [ebp - 0x808]
push eax
movzx eax, word [ebp - 0x810]
push ecx
push edx
push eax
lea ecx, [ebp - 0x408]
push str._02d:_02d:_02d__s_r_n
push ecx
call ebx
lea eax, [ebp - 0x408]
add esp, 0x40
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10127dc0
mov ecx, dword [esi + 0x210]
sub eax, edx
push 0
lea edx, [ebp - 0x81c]
push edx
push eax
lea eax, [ebp - 0x408]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1012db16
mov esp, ebp
pop ebp
ret

Function at 0x101280b0
Capabilities:
Create thread

Disassembly:
cmp dword [0x10a77270], 0
je 0x101280f6
mov eax, dword [0x10a76a48]
push 0x11920e14
mov dword [0x108c19e8], eax
xor eax, eax
push eax
push 0x108c19e4
push 0x101281e0
push eax
push eax
mov dword [0x108c19f0], eax
mov dword [0x108c19f4], eax
mov dword [0x108c19f8], eax
mov dword [0x108c19fc], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x108c19ec], eax
ret
Function at 0x10128100
Capabilities:
Check for time delay via gettickcount

Disassembly:
cmp dword [0x10a77294], 0
je 0x1012811d
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ecx, dword [0x10a77294]
cmp eax, dword [ecx]
jne case.0x10128153.0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
sub eax, dword [esi*4 + 0x108c19f0]
cmp eax, 0x1388
jb 0x10128148
call edi
mov dword [esi*4 + 0x108c19f0], eax
mov dword [esi*4 + 0x108c19f8], 0
mov eax, dword [0x10a77274]
pop edi
cmp eax, 5
ja case.default.0x10128153
jmp dword [eax*4 + 0x101281c0]
inc dword [esi*4 + 0x108c19f8]
cmp dword [esi*4 + 0x108c19f8], 0x19
jmp 0x101281ad
inc dword [esi*4 + 0x108c19f8]
cmp dword [esi*4 + 0x108c19f8], 0x14
jmp 0x101281ad
inc dword [esi*4 + 0x108c19f8]
cmp dword [esi*4 + 0x108c19f8], 0xf
jmp 0x101281ad
inc dword [esi*4 + 0x108c19f8]
cmp dword [esi*4 + 0x108c19f8], 0xa
jmp 0x101281ad
inc dword [esi*4 + 0x108c19f8]
cmp dword [esi*4 + 0x108c19f8], 5
jbe case.0x10128153.0
push 0
push 0
push 9
call fcn.10121370
add esp, 0xc
ret

Function at 0x101283b0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
push 0
push 0x20
push 3
push 0
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x10128410
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x101283f6
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [esi + 4], 0
mov ecx, dword [esi + 8]
push ecx
call fcn.1012baac
add esp, 4
mov dword [esi + 4], eax
test eax, eax
jne 0x10128417
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 8]
push 0
lea edx, [ebp - 4]
push edx
push ecx
push eax
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
test eax, eax
je 0x1012840a
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x10128450
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, ecx
call fcn.101283b0
test al, al
jne 0x1012845e
pop esi
ret
push edi
mov edi, dword [esi + 8]
cmp edi, 8
jae 0x1012846c
pop edi
xor al, al
pop esi
ret
mov edx, dword [esi + 4]
mov eax, 0x10137394
mov ecx, 8
sub edx, eax
push ebx
lea esp, [esp]
mov ebx, dword [edx + eax]
cmp ebx, dword [eax]
jne 0x101284ee
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x10128480
add edi, 0xfffffff8
xor eax, eax
test edi, edi
jle 0x101284e3
jmp 0x101284a0
mov ecx, dword [esi + 4]
mov edx, eax
and edx, 0x1f
movsx edx, byte [edx + 0x108bc894]
and edx, 0xf
movzx edx, byte [edx + 0x10137898]
sub byte [ecx + eax + 8], dl
lea ecx, [ecx + eax + 8]
mov ecx, dword [esi + 4]
mov edx, eax
and edx, 0xf
movzx edx, byte [edx + 0x10137898]
xor byte [ecx + eax + 8], dl
lea ecx, [ecx + eax + 8]
mov ecx, dword [esi + 8]
inc eax
sub ecx, 8
cmp eax, ecx
jl 0x101284a0
mov edi, esi
call fcn.10128500
pop ebx
pop edi
pop esi
ret
pop ebx
pop edi
xor al, al
pop esi
ret
Function at 0x10128500
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea esi, [edi + 0xc]
call dword [sym.imp.MSVCR100.dll_rand]
cdq
mov ecx, 0x2710
idiv ecx
push edx
push str.LogsError_d.log
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0x102
push 2
push 0
push 7
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10128573
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
push 0
lea edx, [ebp - 4]
push edx
sub eax, 8
push eax
add ecx, 8
push ecx
push esi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
test eax, eax
jne 0x1012857a
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x10128590
Capabilities:
Delete file

Disassembly:
push edi
lea edi, [esi + 0xc]
mov ecx, 0x10135e76
mov eax, edi
jmp 0x101285a0
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x101285c0
test dl, dl
je 0x101285bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x101285c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x101285a0
xor eax, eax
jmp 0x101285c5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x101285fc
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x101285fc
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
push 0x100
push 0
push edi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call sub.MSVCR100.dll_memset
add esp, 0x10
pop edi
ret
Function at 0x10128790
Capabilities:
Check for time delay via gettickcount
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1012fd83
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
push ebx
push esi
mov eax, dword [0x1014a018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x108c1b20]
cmp eax, 0x927c0
jb 0x101287d6
call esi
mov dword [0x108c1b20], eax
xor ebx, ebx
push ebx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
call dword [sym.imp.gdiplus.dll_GdiplusStartup]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
push 0x14
lea edx, [ebp - 0x1c]
push edx
mov dword [ebp - 4], ebx
call fcn.1011feb0
mov esi, dword [ebp - 0x1c]
test al, al
jne 0x1012881e
cmp esi, dword [ebp - 0x18]
jne 0x101288d8
lea eax, [ebp - 0x1c]
push eax
call fcn.10128930
cmp dword [0x108c1700], ebx
je 0x101288d8
push 0x32
lea ecx, [ebp - 0x1c]
push ecx
call fcn.1011feb0
lea edx, [ebp - 0xe8]
push edx
call fcn.10128b00
lea esi, [ebp - 0xd0]
mov byte [ebp - 4], 1
call fcn.10129680
push ebx
test eax, eax
jne 0x10128878
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax + 4]
push 2
lea ecx, [ebp + ecx - 0xe8]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
jmp 0x1012888f
mov ecx, dword [ebp - 0xe8]
mov ecx, dword [ecx + 4]
push ebx
lea ecx, [ebp + ecx - 0xe8]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
push ebx
sub edx, esi
push edx
push esi
lea ecx, [ebp - 0xd8]
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
lea eax, [ebp - 0xe8]
push eax
call fcn.10128c70
push 2
push str.image.jpeg
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
call fcn.1012b0c0
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], bl
call fcn.10128bc0
lea ecx, [ebp - 0x78]
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.gdiplus.dll_GdiplusShutdown]
cmp esi, ebx
je 0x101288f0
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x101297d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1012fc48
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x1014a018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [edi + 0x44], ebx
je 0x1012993d
cmp byte [edi + 0x49], bl
je 0x1012993d
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
mov ecx, edi
call edx
cmp eax, 0xffffffff
je 0x10129931
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x2c], bl
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], 8
cmp ecx, 0x10
jae 0x10129844
lea eax, [ebp - 0x2c]
mov byte [eax + 8], bl
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x2c]
cmp eax, 0x10
jae 0x1012988f
lea ecx, [ebp - 0x2c]
mov eax, ecx
add ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x30]
push edx
push ecx
mov ecx, dword [edi + 0x44]
push eax
lea eax, [edi + 0x4c]
push eax
call dword [sym.imp.MSVCP100.dll_public:_int___thiscall_std::codecvt_char__char__int_::unshift_int___char___char___char___const]
sub eax, ebx
je 0x10129894
dec eax
je 0x10129897
sub eax, 2
lea esi, [ebp - 0x2c]
je 0x10129938
call fcn.10002e20
xor al, al
jmp 0x1012993f
mov eax, dword [ebp - 0x2c]
jmp 0x1012985a
mov byte [edi + 0x49], bl
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x2c]
mov eax, ecx
cmp edx, 0x10
jae 0x101298a7
lea eax, [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
sub esi, eax
je 0x101298cd
mov eax, ecx
cmp edx, 0x10
jae 0x101298b8
lea eax, [ebp - 0x2c]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x10129929
cmp byte [edi + 0x49], bl
je 0x10129935
cmp esi, ebx
jne 0x1012984a
mov eax, dword [ebp - 0x1c]
or edx, 0xffffffff
sub edx, eax
cmp edx, 8
jbe 0x1012995a
lea esi, [eax + 8]
lea eax, [ebp - 0x2c]
call fcn.100031c0
test al, al
je 0x1012984a
cmp dword [ebp - 0x18], 0x10
mov ecx, dword [ebp - 0x2c]
jae 0x10129906
lea ecx, [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ecx + edx], eax
mov dword [ecx + edx + 4], eax
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
jae 0x10129921
lea eax, [ebp - 0x2c]
mov byte [eax + esi], bl
jmp 0x1012984a
lea esi, [ebp - 0x2c]
call fcn.10002e20
xor al, al
jmp 0x1012993f
lea esi, [ebp - 0x2c]
call fcn.10002e20
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1012db16
mov esp, ebp
pop ebp
ret
push str.string_too_long
call dword [sym.imp.MSVCP100.dll_void___cdecl_std::_Xlength_error_char_const__]
int3
Function at 0x1012a070
Capabilities:
Enumerate process modules
Get process image filename

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1594
call fcn.1012e580
mov eax, dword [0x1014a018]
xor eax, esp
mov dword [esp + 0x1590], eax
push ebx
push esi
push edi
lea eax, [esp + 0x14]
push eax
push 0x1000
lea ecx, [esp + 0x150]
xor edi, edi
push ecx
mov dword [esp + 0x20], edi
call dword [sym.imp.PSAPI.DLL_EnumProcesses]
test eax, eax
jne 0x1012a0ca
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1590]
xor ecx, esp
call fcn.1012db16
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x14]
shr esi, 2
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], esi
cmp esi, edi
jle 0x1012a1b9
lea eax, [esp + edi*4 + 0x148]
mov dword [esp + 0x1c], eax
mov eax, dword [eax]
test eax, eax
je 0x1012a1ac
push eax
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x1012a1a5
push 0x104
lea edx, [esp + 0x118c]
push edx
push ebx
call dword [sym.imp.PSAPI.DLL_GetProcessImageFileNameW]
test eax, eax
je 0x1012a1a5
lea esi, [esp + 0x1188]
call fcn.1011f250
push eax
lea eax, [esp + 0x114c]
push 0x1013ee44
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x139c]
push ecx
mov ecx, esi
call fcn.1011efb0
add esp, 0x10
test al, al
je 0x1012a1a1
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
mov dword [esp + 0x20], eax
mov ecx, 8
lea esi, [esp + 0x1148]
lea edi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x1390]
push ecx
lea edx, [esp + 0x48]
push 0x1013f2e8
push edx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x20]
push eax
call fcn.1012a670
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
mov dword [esp + 0x10], edi
cmp edi, esi
jl 0x1012a0e1
mov ecx, dword [esp + 0x159c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.1012db16
mov esp, ebp
pop ebp
ret
Function at 0x1012a930
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 4]
push eax
push 0x40
push 0x100
push 0x10a76ae0
call esi
mov ecx, dword [ebp + 8]
push 0x100
add ecx, 5
push ecx
push 0x10a76ae0
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
lea edx, [ebp - 4]
push edx
push eax
push 0x100
push 0x10a76ae0
call esi
push 0
push 0
push 0
push 0x1012a910
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x1012a9a0
Capabilities:
Encode data using xor

Disassembly:
or eax, 0xffffffff
test ecx, ecx
je 0x1012a9c9
push ebx
push edi
lea esp, [esp]
movzx ebx, byte [edx]
mov edi, eax
and edi, 0xff
xor edi, ebx
shr eax, 8
xor eax, dword [esi + edi*4]
inc edx
dec ecx
jne 0x1012a9b0
pop edi
pop ebx
not eax
ret

Function at 0x1012a9d0
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x1014a018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push 0x1013f3e0
push eax
lea eax, [ebp - 0x408]
push eax
or esi, 0xffffffff
mov dword [ebp - 0x408], 0
call dword [sym.imp.MSVCR100.dll__wfopen_s]
add esp, 0xc
test eax, eax
je 0x1012aa22
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1012db16
mov esp, ebp
pop ebp
ret 8
push ebx
push edi
mov ecx, dword [ebp - 0x408]
push ecx
push 0x400
lea edx, [ebp - 0x404]
push 1
push edx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
mov ecx, eax
lea edx, [ebp - 0x404]
test eax, eax
je 0x1012aa6a
mov edi, edi
movzx ebx, byte [edx]
mov edi, esi
and edi, 0xff
xor edi, ebx
mov ebx, dword [ebp + 8]
shr esi, 8
xor esi, dword [ebx + edi*4]
inc edx
dec ecx
jne 0x1012aa50
cmp eax, 0x400
je 0x1012aa24
mov eax, dword [ebp - 0x408]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
mov eax, esi
pop ebx
xor ecx, ebp
not eax
pop esi
call fcn.1012db16
mov esp, ebp
pop ebp
ret 8