joyce8/EMBER2024-capa huggingface dataset:
Function at 0x6685fc
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff60
push ebx
push esi
push edi
mov byte [ebp - 1], 0
mov dword [ebp - 0xa0], 0x94
lea eax, [ebp - 0xa0]
push eax
call sub.kernel32.dll_GetVersionExA
test eax, eax
je 0x6686aa
mov eax, dword [ebp - 0x90]
sub eax, 1
jb 0x66863c
je 0x668642
dec eax
je 0x668648
jmp 0x6686aa
mov byte [ebp - 1], 1
jmp 0x6686aa
mov byte [ebp - 1], 2
jmp 0x6686aa
cmp dword [ebp - 0x9c], 4
ja 0x668657
mov byte [ebp - 1], 4
jmp 0x6686aa
cmp dword [ebp - 0x9c], 5
jne 0x66866f
cmp dword [ebp - 0x98], 0
jne 0x66866f
mov byte [ebp - 1], 5
jmp 0x6686aa
cmp dword [ebp - 0x9c], 5
jne 0x668687
cmp dword [ebp - 0x98], 1
jne 0x668687
mov byte [ebp - 1], 0xa
jmp 0x6686aa
mov eax, dword [ebp - 0x9c]
cmp eax, 5
jne 0x6686a1
cmp dword [ebp - 0x98], 2
jne 0x6686a1
mov byte [ebp - 1], 0xd
jmp 0x6686aa
cmp eax, 6
jne 0x6686aa
mov byte [ebp - 1], 0xf
mov al, byte [ebp - 1]
sub al, 5
je 0x6686b9
sub al, 5
jne 0x66873f
xor eax, eax
mov dword [ebp - 8], eax
mov dl, 1
mov eax, dword [0x4939a0]
call fcn.00493aa0
mov dword [ebp - 0xc], eax
mov edx, 0x80000002
mov eax, dword [ebp - 0xc]
call fcn.00493b40
xor eax, eax
push ebp
push 0x668721
push dword fs:[eax]
mov dword fs:[eax], esp
xor ecx, ecx
mov edx, 0x668754
mov eax, dword [ebp - 0xc]
call fcn.00493ba4
test al, al
je 0x668717
mov edx, 0x668788
mov eax, dword [ebp - 0xc]
call fcn.00493df8
test eax, eax
jns 0x668711
add eax, 0xff
sar eax, 8
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x66872b
mov eax, dword [ebp - 0xc]
call fcn.00403a9c
cmp dword [ebp - 8], 0
je 0x66873f
mov al, byte [ebp - 8]
add byte [ebp - 1], al
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x67e450
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
mov ecx, 4
push 0
push 0
dec ecx
jne 0x67e458
push ecx
push ebx
push esi
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00404e3c
xor eax, eax
push ebp
push 0x67e59b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x28], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 0x30], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x34], eax
lea eax, [ebx + 4]
mov edx, dword [ebp - 4]
call fcn.004049e0
mov dl, 1
mov eax, dword [0x6749dc]
call fcn.00677bfc
mov esi, eax
mov eax, esi
call fcn.00677d78
push dword [ebx + 0x2c]
push dword [ebx + 0x28]
push dword [ebx + 0x34]
push dword [ebx + 0x30]
mov cl, 1
xor edx, edx
mov eax, esi
call fcn.006783a0
lea ecx, [ebp - 8]
mov edx, dword [ebx + 4]
mov eax, esi
call fcn.0067a81c
mov edx, dword [ebp - 8]
lea eax, [ebx + 8]
call fcn.004049e0
lea edx, [ebp - 0xc]
mov eax, esi
call fcn.0067aad4
mov edx, dword [ebp - 0xc]
lea eax, [ebx + 0xc]
call fcn.004049e0
lea edx, [ebp - 0x10]
mov eax, esi
call fcn.0067b1e8
mov edx, dword [ebp - 0x10]
lea eax, [ebx + 0x10]
call fcn.004049e0
lea edx, [ebp - 0x14]
mov eax, esi
call fcn.0067b530
mov edx, dword [ebp - 0x14]
lea eax, [ebx + 0x14]
call fcn.004049e0
lea edx, [ebp - 0x18]
mov eax, esi
call fcn.0067b8d4
mov edx, dword [ebp - 0x18]
lea eax, [ebx + 0x18]
call fcn.004049e0
lea edx, [ebp - 0x1c]
mov eax, esi
call fcn.0067b944
mov edx, dword [ebp - 0x1c]
lea eax, [ebx + 0x1c]
call fcn.004049e0
lea edx, [ebp - 0x20]
mov eax, esi
call fcn.0067ba9c
mov edx, dword [ebp - 0x20]
lea eax, [ebx + 0x20]
call fcn.004049e0
lea edx, [ebp - 0x24]
mov eax, esi
call fcn.0067c158
mov edx, dword [ebp - 0x24]
lea eax, [ebx + 0x24]
call fcn.004049e0
mov dl, 1
mov eax, esi
call fcn.00677c50
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x67e5a2
lea eax, [ebp - 0x24]
mov edx, 9
call fcn.004049b0
ret
Function at 0x680378
Capabilities:
Persist via winlogon helper dll registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404e3c
xor eax, eax
push ebp
push 0x680439
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov dl, 1
mov eax, dword [0x4939a0]
call fcn.00493aa0
mov dword [ebp - 0xc], eax
mov edx, 0x80000002
mov eax, dword [ebp - 0xc]
call fcn.00493b40
xor eax, eax
push ebp
push 0x680409
push dword fs:[eax]
mov dword fs:[eax], esp
mov cl, 1
mov edx, 0x680454
mov eax, dword [ebp - 0xc]
call fcn.00493ba4
test al, al
je 0x6803ff
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.00409874
mov ecx, dword [ebp - 0x10]
mov edx, 0x680494
mov eax, dword [ebp - 0xc]
call fcn.00493d40
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x680413
mov eax, dword [ebp - 0xc]
call fcn.00403a9c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x680440
lea eax, [ebp - 0x10]
call fcn.0040498c
lea eax, [ebp - 4]
call fcn.0040498c
ret

Function at 0x68ac30
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0
xor eax, eax
push ebp
push 0x68ac8d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x6afd5c]
mov eax, dword [eax]
call fcn.0066d88c
mov eax, dword [0x6afd5c]
xor edx, edx
mov dword [eax], edx
push 1
lea edx, [ebp - 4]
mov eax, dword [0x6afcb4]
mov eax, dword [eax]
call fcn.004706f8
mov eax, dword [ebp - 4]
call fcn.00404e4c
push eax
call sub.kernel32.dll_WinExec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x68ac94
lea eax, [ebp - 4]
call fcn.0040498c
ret
Function at 0x10030d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
push edi
mov dword [ebp - 0xc], esi
jne 0x10030f2
mov dword [ebp + 8], 0x8000ffff
jmp 0x10032a3
xor ebx, ebx
cmp dword [0x100800c], ebx
je 0x100312e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
test al, 2
je 0x1003122
lea eax, [ebp - 0x10]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
mov dword [0x1008018], 1
jne 0x1003128
mov dword [0x1008018], ebx
mov dword [0x100800c], ebx
cmp dword [0x1008018], ebx
je 0x1003171
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push eax
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x100328d
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1003294
call esi
jmp 0x10032a0
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax*4 + 2]
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
jne 0x100319d
mov dword [ebp + 8], 0x8007000e
jmp 0x10032a3
mov cx, word [edi]
xor eax, eax
cmp cx, bx
je 0x10031e6
push 0xa
pop edx
cmp cx, 0xd
jne 0x10031c5
cmp word [edi + 2], dx
jne 0x10031c5
mov word [esi + eax*2], cx
inc eax
mov word [esi + eax*2], dx
inc eax
add edi, 4
jmp 0x10031de
cmp cx, dx
jne 0x10031d7
mov word [esi + eax*2], 0xd
inc eax
mov word [esi + eax*2], dx
jmp 0x10031db
mov word [esi + eax*2], cx
inc eax
inc edi
inc edi
mov cx, word [edi]
cmp cx, bx
jne 0x10031aa
mov edi, dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push esi
push ebx
mov word [esi + eax*2], bx
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push eax
call ebx
test eax, eax
mov dword [ebp - 4], eax
jne 0x1003213
push esi
call dword [sym.imp.msvcrt.dll_free]
jmp 0x1003262
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov dword [ebp + 8], eax
xor eax, eax
cmp dword [ebp + 8], eax
pop ecx
jne 0x100323c
push esi
call dword [sym.imp.msvcrt.dll_free]
mov dword [ebp + 8], 0x8007000e
mov dword [esp], 0x1006c24
jmp 0x10032a8
push eax
push eax
push dword [ebp - 4]
push dword [ebp + 8]
push 0xffffffffffffffff
push esi
push eax
call edi
push eax
call ebx
push esi
mov esi, dword [sym.imp.msvcrt.dll_free]
mov edi, eax
call esi
test edi, edi
pop ecx
jne 0x1003268
push dword [ebp + 8]
call esi
pop ecx
jmp 0x100315a
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
dec edi
push edi
push dword [ebp + 8]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100315a
push dword [ebp + 8]
call esi
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4
call esi
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 8], eax
push 0x1006c24
lea eax, [ebp + 8]
push eax
call sub.msvcrt.dll__CxxThrowException
int3
Function at 0x1003595
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov eax, 0x10067ca
call fcn.01005160
push ecx
mov eax, ecx
xor ecx, ecx
push esi
push edi
mov dword [ebp - 0x10], eax
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [ebp - 4], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp + 8]
mov dword [eax], edx
mov dword [eax + 0x28], ecx
mov dword [eax + 0x2c], ecx
mov dword [eax + 0x30], ecx
mov dword [eax + 0x34], ecx
mov edx, 0x1001e44
lea edi, [eax + 0x38]
mov esi, edx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edi, [eax + 0x48]
mov esi, edx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
or dword [eax + 4], 0xffffffff
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], 2
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 4
Function at 0x1003acb
Capabilities:
Accept command line arguments

Disassembly:
mov eax, 0x1006840
call fcn.01005160
push ecx
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0x1001710
push 0
mov dword [esp + 0x18], esi
call dword [sym.imp.msvcrt.dll_setlocale]
pop ecx
pop ecx
push 0
call sub.KERNEL32.dll_SetThreadUILanguage
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
mov ebp, dword [esp + 0x28]
mov dword [esi + 4], eax
mov ebx, 0x800000
mov edi, 0x1001484
mov esi, 0x10013f8
jne 0x1003b75
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x1003b2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1003b3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0x80070000
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10016b0
push dword [esp + 0x30]
sub esp, 0x40
mov ecx, esp
mov dword [esp + 0x74], esp
push 0
push ebx
push 0x21a
push edi
push esi
call fcn.01002cea
or dword [esp + 0x68], 0xffffffff
push ebp
call fcn.01002f03
add esp, 0x50
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
xor edx, edx
cmp eax, edx
mov dword [ebp], eax
jge 0x1003bba
push eax
push 0x1001650
push 0x8000ffff
sub esp, 0x40
mov ecx, esp
mov dword [esp + 0x74], esp
push edx
push ebx
push 0x222
push edi
push esi
call fcn.01002cea
or dword [esp + 0x68], 0xffffffff
push ebp
call fcn.01002f03
add esp, 0x50
xor edx, edx
push edx
push edx
push edx
push 3
push 2
push edx
push edx
push 0xffffffffffffffff
push edx
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
mov dword [ebp], eax
jge 0x1003c00
push eax
push 0x10015f0
push eax
sub esp, 0x40
mov ecx, esp
mov dword [esp + 0x74], esp
push 0
push ebx
push 0x233
push edi
push esi
call fcn.01002cea
or dword [esp + 0x68], 0xffffffff
push ebp
call fcn.01002f03
add esp, 0x50
mov esi, dword [esp + 0x10]
push 0x6f
push ebp
push esi
call fcn.01003839
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
add esi, 0x20
push esi
push ebp
call fcn.01002fd8
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
leave
ret 4
Function at 0x1004f6f
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x70
push 0x1001e18
call fcn.01005238
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x1004faa
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1004faa
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x1004fc2
cmp eax, 0x20b
je 0x1004faf
mov dword [ebp - 0x1c], edi
jmp 0x1004fd6
cmp dword [ecx + 0x84], 0xe
jbe 0x1004faa
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x1004fd0
cmp dword [ecx + 0x74], 0xe
jbe 0x1004faa
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
push 2
pop ebx
push ebx
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
or dword [0x1009088], 0xffffffff
or dword [0x100908c], 0xffffffff
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x1008028]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x1008024]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x1009090], eax
call fcn.010051fa
cmp dword [0x1008010], edi
jne 0x1005033
push fcn.010051fa
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
call fcn.010051e8
push 0x10011a0
push 0x100119c
call sub.msvcrt.dll__initterm
mov eax, dword [0x1008020]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push dword [0x100801c]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.msvcrt.dll___wgetmainargs]
mov dword [ebp - 0x30], eax
push 0x1001198
push 0x1001190
call sub.msvcrt.dll__initterm
add esp, 0x24
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
mov esi, dword [eax]
cmp esi, edi
jne 0x1005099
or dword [ebp - 4], 0xffffffff
mov eax, 0xff
jmp 0x1005153
mov dword [ebp - 0x34], esi
cmp word [esi], 0x22
jne 0x10050e7
add esi, ebx
mov dword [ebp - 0x34], esi
mov ax, word [esi]
cmp ax, di
je 0x10050b5
cmp ax, 0x22
jne 0x10050a2
cmp word [esi], 0x22
jne 0x10050c0
add esi, ebx
mov dword [ebp - 0x34], esi
mov ax, word [esi]
cmp ax, di
je 0x10050ce
cmp ax, 0x20
jbe 0x10050bb
mov dword [ebp - 0x4c], edi
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [ebp - 0x4c], 1
je 0x10050f4
movzx eax, word [ebp - 0x48]
jmp 0x10050f7
cmp word [esi], 0x20
jbe 0x10050c0
add esi, ebx
mov dword [ebp - 0x34], esi
jmp 0x10050e7
push 0xa
pop eax
push eax
push esi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov esi, eax
mov dword [ebp - 0x7c], esi
cmp dword [ebp - 0x1c], edi
jne 0x1005118
push esi
call dword [sym.imp.msvcrt.dll_exit]
call dword [sym.imp.msvcrt.dll__cexit]
jmp 0x100514d
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.01005271
ret
Function at 0x1005666
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
cmp dword [esi + 0x10], 0
je 0x100567a
lea eax, [esi + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [esi + 4], 0xffffffff
je 0x10056a1
push edi
push 0
lea eax, [esp + 0xc]
push eax
lea edi, [esi + 0x54]
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
shl eax, 1
push eax
push edi
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
xor eax, eax
pop esi
pop ecx
ret

Function at 0x10056fd
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x1006a88
call fcn.01005160
sub esp, 0x218
push ebx
push esi
xor ebx, ebx
push edi
mov esi, ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov byte [ebp - 4], 1
push 0x20019
push 0x1001f00
mov edi, 0x80000002
push edi
lea ecx, [ebp - 0x1c]
mov dword [esi], ebx
mov dword [esi + 0x1054], ebx
call fcn.01005375
test eax, eax
jne 0x1005773
push 0x1001f1c
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call fcn.010053aa
cmp eax, ebx
mov eax, dword [ebp - 0x14]
je 0x1005765
mov eax, ebx
xor ecx, ecx
cmp eax, 1
sete cl
mov dword [esi + 0x1054], ecx
push 0x20019
push 0x1001e98
push edi
lea ecx, [ebp - 0x10]
call fcn.01005375
cmp eax, ebx
jne 0x1005850
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 0x1002030
push dword [ebp - 0x10]
mov dword [ebp - 0x18], 0x104
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x10057ca
lea eax, [ebp - 0x224]
push eax
lea eax, [esi + 8]
push eax
call fcn.010055da
push 0x1002018
lea eax, [esi + 0x24]
push eax
lea ecx, [ebp - 0x10]
call fcn.01005619
push 0x1001ff8
lea eax, [esi + 0x14]
push eax
lea ecx, [ebp - 0x10]
call fcn.0100563d
lea eax, [esi + 0xc]
push 0x1001fe0
push eax
lea ecx, [ebp - 0x10]
call fcn.0100563d
push 0x1001fc0
lea edi, [esi + 0x10]
push edi
lea ecx, [ebp - 0x10]
call fcn.0100563d
push 0x1001fa0
lea eax, [esi + 0x1c]
push eax
lea ecx, [ebp - 0x10]
call fcn.0100563d
push 0x1001f7c
lea eax, [esi + 0x18]
push eax
lea ecx, [ebp - 0x10]
call fcn.0100563d
push 0x1001f5c
lea eax, [esi + 0x20]
push eax
lea ecx, [ebp - 0x10]
call fcn.0100563d
cmp dword [edi], ebx
jne 0x100584a
cmp dword [esi + 0xc], ebx
je 0x1005850
mov dword [esi], 1
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x10]
call fcn.0100535e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.0100535e
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x10059ff
Capabilities:
Get file size
Persist via application shimming
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi + 0x50]
call fcn.0100542f
xor ebx, ebx
cmp dword [esi], ebx
je 0x1005b7a
mov eax, dword [ebp + 0x14]
test dword [esi + 0x24], eax
je 0x1005b7a
push edi
mov edi, dword [ebp + 8]
cmp edi, ebx
jne 0x1005a38
mov dword [esi + 0x48], 0x1002330
jmp 0x1005a6f
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [edi + eax*2 - 2]
xor ecx, ecx
cmp eax, edi
jbe 0x1005a6c
cmp ecx, 3
jge 0x1005a60
dec eax
dec eax
cmp word [eax], 0x5c
je 0x1005a5b
cmp eax, edi
ja 0x1005a4f
inc ecx
cmp eax, edi
ja 0x1005a4a
cmp eax, edi
jbe 0x1005a6c
add eax, 2
mov dword [esi + 0x48], eax
jmp 0x1005a6f
mov dword [esi + 0x48], edi
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x4c], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
mov dword [esi + 0x44], eax
mov eax, dword [ebp + 0x1c]
inc edi
cmp dword [esi + 0xc], ebx
mov dword [esi + 0x40], eax
je 0x1005b76
mov eax, dword [esi + 8]
cmp eax, ebx
jne 0x1005a99
mov eax, 0x1001260
push ebx
push 0x80
push 4
push ebx
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x1005ac9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002298
jmp 0x1005b6d
lea ecx, [ebp - 0x1c]
push ecx
push ebx
push edi
push ebx
push 2
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
jne 0x1005b07
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10021d0
jmp 0x1005b6d
lea eax, [ebp - 8]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1005b3c
mov eax, dword [ebp - 8]
or eax, dword [ebp - 4]
jne 0x1005b3c
or byte [ebp + 0x16], 0xff
push ebx
lea eax, [ebp + 8]
push eax
push 2
lea eax, [ebp + 0x16]
push eax
push dword [esi + 4]
mov byte [ebp + 0x17], 0xfe
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 2
push ebx
push ebx
push ebx
push dword [esi + 4]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1005b76
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002108
push esi
call fcn.01005878
add esp, 0xc
mov dword [esi + 0x3c], edi
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x18
Function at 0x1005c04
Capabilities:
Access the windows event log

Disassembly:
mov eax, 0x1006ae1
call fcn.01005160
sub esp, 0xb8
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
and dword [ebp - 4], 0
push 0x1002560
sub esp, 0x40
mov ecx, esp
mov dword [ebp - 0x14], esp
push 0
push 0x4000
push 0x37b
push 0x1002554
mov ebx, 0x10024e0
push ebx
call fcn.01002cea
and byte [ebp - 4], 0
lea ecx, [ebp - 0x30]
call fcn.01002d52
mov byte [ebp - 4], 2
mov byte [ebp - 4], 3
push 8
push dword [ebp + 0x14]
lea eax, [ebp - 0x50]
push eax
mov esi, dword [sym.imp.msvcrt.dll_strncpy]
call esi
push 0xa
lea eax, [ebp - 0x74]
push eax
push dword [ebp + 0x18]
mov edi, dword [sym.imp.msvcrt.dll__ultoa]
call edi
push 8
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x48]
push eax
call esi
push 8
mov eax, dword [ebp + 8]
push dword [eax + 8]
lea eax, [ebp - 0x40]
push eax
call esi
push 0xa
lea eax, [ebp - 0x74]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0xc]
call edi
push 8
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x38]
push eax
call esi
add esp, 0x48
mov ecx, dword [ebp + 0x4c]
mov dword [ebp - 0x78], ecx
xor esi, esi
mov dword [ebp - 0x7c], esi
cmp word [ebp - 0x7c], cx
jae 0x1005cdc
movzx eax, word [ebp - 0x7c]
shl eax, 2
mov edx, dword [ebp + eax + 0x24]
mov dword [ebp + eax - 0xa4], edx
inc dword [ebp - 0x7c]
jmp 0x1005cbf
push 0x1001e58
push esi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov dword [ebp - 0xa8], eax
cmp eax, esi
jne 0x1005d38
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002490
push 0x8000ffff
sub esp, 0x40
mov ecx, esp
mov dword [ebp - 0xac], esp
push esi
mov esi, 0x8000
push esi
push 0x398
mov edi, 0x1002554
push edi
push ebx
call fcn.01002cea
mov byte [ebp - 4], 3
lea eax, [ebp - 0x30]
push eax
call fcn.01002f03
add esp, 0x50
jmp 0x1005d42
mov esi, 0x8000
mov edi, 0x1002554
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0xa4]
push eax
push 0x20
push dword [ebp - 0x78]
push 0
push dword [ebp + 0xc]
push 0
push dword [ebp + 0x50]
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
mov dword [ebp - 0xb0], eax
test eax, eax
jne 0x1005da8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002450
sub esp, 0x40
mov ecx, esp
mov dword [ebp - 0xb4], esp
push 0
push esi
push 0x3a7
push edi
push ebx
call fcn.01002cea
mov byte [ebp - 4], 3
lea eax, [ebp - 0x30]
push eax
call fcn.01002e71
add esp, 0x4c
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov dword [ebp - 0xb0], eax
test eax, eax
jne 0x1005df9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002400
push 0x8000ffff
sub esp, 0x40
mov ecx, esp
mov dword [ebp - 0xb8], esp
push 0
push esi
push 0x3ac
push edi
push ebx
call fcn.01002cea
mov byte [ebp - 4], 3
lea eax, [ebp - 0x30]
push eax
call fcn.01002f03
add esp, 0x50
and dword [ebp - 4], 0
lea ecx, [ebp - 0x30]
call fcn.01002df8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10]
call fcn.01002d2b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret