joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41e8ad
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x47da88]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41e8ed
cmp byte [ebx], 0xa
jne 0x41e8ed
or byte [edi + eax + 0x28], 4
jmp 0x41e8f2
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x41e9f1
mov dl, byte [eax]
cmp dl, 0x1a
je 0x41e9d4
inc eax
cmp dl, 0xd
je 0x41e91e
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x41e944
cmp eax, ecx
jae 0x41e952
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x41e906
jmp 0x41e9f1
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41e9cf
cmp dword [ebp - 0x10], 0
je 0x41e9cf
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x47da88]
test byte [eax + edi + 0x28], 0x48
je 0x41e9a9
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41e994
mov byte [esi], dl
jmp 0x41e9a5
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x47da88]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x41e9f1
cmp byte [ebp - 1], 0xa
jne 0x41e9b8
cmp esi, ebx
jne 0x41e9b8
mov byte [esi], 0xa
jmp 0x41e9f0
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041f433
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x41e9f1
mov byte [esi], 0xd
jmp 0x41e9f0
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x47da88]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41e9ee
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41e9f1
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41e9fa
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x47da88]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41ea40
cmp word [ebx], dx
jne 0x41ea40
or byte [eax + edi + 0x28], 4
jmp 0x41ea45
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x41eba8
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x41eb88
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x41ea86
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41eabc
cmp eax, edx
jae 0x41eaca
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x41ea61
jmp 0x41eba8
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41eb83
cmp dword [ebp - 0x18], 0
je 0x41eb83
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x47da88]
test byte [eax + edi + 0x28], 0x48
je 0x41eb59
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x41eb1d
mov word [esi], cx
jmp 0x41eb54
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x47da88]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x47da88]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x47da88]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x41eba8
pop eax
cmp word [ebp - 4], ax
jne 0x41eb69
cmp esi, ebx
jne 0x41eb69
mov word [esi], ax
jmp 0x41eba5
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041f433
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x41eba8
push 0xd
pop eax
jmp 0x41eb64
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x47da88]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x41eba2
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x41eba8
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x417a10
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push 0
push 0
push 3
push 0
push 3
push 0x40000000
push str.CONOUT_
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
lea eax, [esp + 8]
push eax
push esi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
test eax, eax
je 0x417a5f
mov ecx, dword [0x4c3a9c]
push 0x4c378c
push ecx
mov dword [0x4c0064], edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov eax, edi
pop edi
pop esi
pop ecx
ret

Function at 0x44dca5
Capabilities:
Encode data using xor

Disassembly:
jno 0x44dc7b
jne 0x44dcd9
sbb dh, ch
cmc
dec esi
pop eax
hlt
pushal
stosd dword es:[edi], eax
pushfd
movsb byte es:[edi], byte [esi]
in al, dx
jg 0x44dd1c
inc edi
enter 0xffffffffffff8094, 0x64
in al, dx
jns 0x44dc76
invalid
rol dword [ebx + 0x26], 1
adc ebp, dword [esi]
pushal
and ah, ah
into
xor cl, bh
or byte [eax + 0x66], 0xfe
xor edx, dword [eax - 0x54138769]
sbb esi, eax
outsb dx, byte [esi]
invalid
popal
xlatb
xchg ecx, eax
push eax
mov al, 0xaa
aam 0xe0
mov bh, 0xa2
int1
invalid

Function at 0x4a716b
Capabilities:
Packed with generic packer

Disassembly:
inc eax
add byte [edx], cl
or dword [esi + eax*2 + 0x69], edx
insb byte es:[edi], dx
dec esi
popal
insd dword es:[edi], dx
nop
mov ah, 0x90
inc eax
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax + edx*4 + 0x40], dh
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
invalid

Function at 0x4adb41
Capabilities:
Encode data using xor

Disassembly:
stosd dword es:[edi], eax
mov dh, 0x11
mov cl, 0x69
push ebx
xor edi, dword [ebx - 0x2c5ea03a]
mov bx, 0x877d
xchg ebp, eax
sbb byte [ebp - 0x7a], dl
or eax, 0x805bd5e9
bound eax, qword fs:[esi - 0x14f03622]
les ebp, [edx + 0x3a]
out 0xa, al
mov eax, 0xa4988e6a
sal dword [edx], 0x1e
xor ah, bh
mov ebp, edi
pushal
xchg edi, eax
out 0x2a, eax
jle 0x4adb64
aas
popal
xor eax, 0xb320cea2
mov ebx, 0xbfc4e28
out 0x2c, eax
cmc
leave
cmp byte [edx - 0x68410d4d], bh
sar byte [edx], cl
or dl, bh
invalid
Function at 0x401221
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40a11c]
jne 0x40122b
repz ret
jmp fcn.00402772

Function at 0x4031b3
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00401f8f
and dword [ebp - 4], 0
cmp dword [0x40b660], 0
mov ebx, eax
jne 0x403264
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x403315
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x403315
push eax
call fcn.00401f1d
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x40b660], eax
call esi
push eax
call fcn.00401f1d
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x40b664], eax
call esi
push eax
call fcn.00401f1d
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x40b668], eax
call esi
push eax
call fcn.00401f1d
pop ecx
mov dword [0x40b670], eax
test eax, eax
je 0x403264
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00401f1d
pop ecx
mov dword [0x40b66c], eax
mov eax, dword [0x40b66c]
cmp eax, ebx
je 0x4032bc
cmp dword [0x40b670], ebx
je 0x4032bc
push eax
call fcn.00401f98
push dword [0x40b670]
mov esi, eax
call fcn.00401f98
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4032bc
test edi, edi
je 0x4032bc
call esi
test eax, eax
je 0x4032b3
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4032b3
test byte [ebp - 0xc], 1
jne 0x4032bc
or dword [ebp + 0x10], 0x200000
jmp 0x4032f5
mov eax, dword [0x40b664]
cmp eax, ebx
je 0x4032f5
push eax
call fcn.00401f98
pop ecx
test eax, eax
je 0x4032f5
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4032f5
mov eax, dword [0x40b668]
cmp eax, ebx
je 0x4032f5
push eax
call fcn.00401f98
pop ecx
test eax, eax
je 0x4032f5
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x40b660]
call fcn.00401f98
pop ecx
test eax, eax
je 0x403315
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x403317
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409020
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x224
mov eax, dword [0x42d018]
xor eax, esp
mov dword [esp + 0x220], eax
push ebp
push esi
push edi
mov edi, dword [esp + 0x234]
mov ebp, ecx
mov eax, dword [ebp]
lea ecx, [esp + 0x18]
push ecx
push 0x2001f
push 0
push edi
push eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0x10]
mov esi, eax
test esi, esi
jne 0x40908e
test ecx, ecx
je 0x409080
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
mov ecx, dword [esp + 0x18]
mov esi, eax
mov dword [esp + 0x10], ecx
je 0x40909c
test ecx, ecx
je 0x409141
push ecx
jmp 0x40913b
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea edx, [esp + 0x20]
push edx
push 0
push 0
push 0
lea eax, [esp + 0x24]
push eax
lea edx, [esp + 0x3c]
push edx
push 0
push ecx
mov dword [esp + 0x34], 0x100
call esi
test eax, eax
jne 0x40910e
jmp 0x4090d0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x14]
call fcn.00409020
mov edi, eax
test edi, edi
jne 0x40915d
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push eax
push eax
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x3c]
push eax
push edi
push ecx
mov dword [esp + 0x34], 0x100
call esi
test eax, eax
je 0x4090d0
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x409125
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], 0
mov edx, dword [ebp]
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov esi, eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x409141
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0041f208
add esp, 0x224
ret 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40916c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x409143
Function at 0x41f208
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42d018]
jne 0x41f212
repz ret
jmp fcn.0041f783

Function at 0x420067
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x42d018]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0041ffa6
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x4200b6
cmp dword [ebp - 0x1c], 5
jb 0x4200ce
jmp 0x4200ca
cmp dword [ebp - 0x10], 1
jne 0x4200ce
cmp dword [ebp - 0x1c], 4
ja 0x4200ca
jne 0x4200ce
cmp dword [ebp - 0x18], 0
jbe 0x4200ce
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x42241c
call fcn.00408cd0
test eax, eax
jge 0x4200ef
mov byte [0xa5a1ac], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0041f208
add ebp, 0x78
leave
ret
Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x42e001
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
call 0x42e00c
nop
nop
nop
nop
nop
pop eax
nop
add eax, 0x403ac5
nop
sub eax, reloc.mscms.dll_SetColorProfileHeader
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
jl 0x42e030
nop
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x42e01e
nop
nop
popal
nop
nop
nop
nop
nop
jmp fcn.00401219

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401730
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x496fd0
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x4c1280]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov dword [ebp - 4], 0
call fcn.004018f0
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
lea edi, [ebx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x18], esi
cmp esi, 0xffffffff
je 0x4018d6
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4017f1
lea eax, [ebp - 0x54]
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x4018ca
cmp dword [ebp - 0x34], 0
jne 0x4017f1
cmp dword [ebp - 0x38], 0
jne 0x4017f1
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 2
lea edx, [ebp - 0x20]
push edx
push esi
mov dword [ebp - 0x20], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4018ca
add dword [ebx + 4], 2
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4018ca
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401817
sub eax, edx
sar eax, 1
mov edx, eax
mov eax, dword [ebp + 0x10]
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401830
sub eax, esi
sar eax, 1
lea edi, [eax + edx + 0x1b]
xor ecx, ecx
lea ebx, [edi + 1]
mov eax, ebx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0047159e
mov esi, eax
add esp, 4
test esi, esi
je 0x4018c7
mov eax, dword [ebp + 0x10]
movzx edx, word [ebp - 0x24]
mov ecx, dword [ebp + 0xc]
push eax
movzx eax, word [ebp - 0x26]
push ecx
movzx ecx, word [ebp - 0x28]
push edx
movzx edx, word [ebp - 0x2a]
push eax
movzx eax, word [ebp - 0x2e]
push ecx
movzx ecx, word [ebp - 0x30]
push edx
push eax
push ecx
push str._04d__02d__02d__02d:_02d:_02d___s_____s_r_n
push ebx
push esi
call fcn.00474cf2
mov ecx, dword [ebp - 0x18]
add esp, 0x2c
push 0
lea edx, [ebp - 0x1c]
push edx
lea eax, [edi + edi]
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4018be
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
add dword [eax + 4], edx
push esi
call fcn.0047311d
add esp, 4
mov esi, dword [ebp - 0x18]
cmp esi, 0xffffffff
je 0x4018d6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4018f0
Capabilities:
Check if file exists
Create directory
Get file attributes
Move file
Print debug messages

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xfffffffffffffffe
push 0x4bb6e0
push 0x476cc0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x4c1280]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, ecx
lea esi, [edi + 0x212]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x401960
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401960
push str.create_log_dir_failed_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea esi, [edi + 8]
xor eax, eax
cmp ax, word [esi]
je 0x401a5b
mov eax, dword [edi + 4]
xor ebx, ebx
cmp eax, ebx
jle 0x401982
cmp eax, 0x200000
jl 0x401a5b
mov dword [ebp - 4], ebx
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x3c]
push ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x401a54
mov eax, dword [ebp - 0x1c]
cmp eax, 0x200000
ja 0x4019cd
cmp dword [ebp - 0x20], ebx
ja 0x4019cd
mov dword [edi + 4], eax
jmp 0x401a54
xor edx, edx
mov word [ebp], dx
push 0x206
push ebx
lea eax, [ebp + 2]
push eax
call fcn.00472990
push esi
push 0x104
lea ecx, [ebp]
push ecx
call fcn.00472a0a
add esp, 0x18
lea eax, [ebp]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401a00
sub eax, edx
sar eax, 1
sub eax, 4
xor edx, edx
mov word [ebp + eax*2], dx
push str..0.log
push 0x104
lea eax, [ebp]
push eax
call fcn.00472b79
add esp, 0xc
push 9
lea ecx, [ebp]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [edi + 4], ebx
jmp 0x401a54
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.00472a79
add ebp, 0x20c
mov esp, ebp
pop ebp
ret
Function at 0x401af0
Capabilities:
Get session user name

Disassembly:
sub esp, 0x21c
mov eax, dword [0x4c1280]
xor eax, esp
mov dword [esp + 0x218], eax
push esi
push 0x206
xor esi, esi
lea ecx, [esp + 0x1a]
xor eax, eax
push esi
push ecx
mov dword [esp + 0x18], 0x104
mov word [esp + 0x20], ax
call fcn.00472990
add esp, 0xc
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x401b6a
lea ecx, [esp + 0x14]
push str.SYSTEM
push ecx
call fcn.00476593
add esp, 8
neg eax
sbb eax, eax
inc eax
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.00472a79
add esp, 0x21c
ret
push 0x104
lea edx, [esp + 0x18]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jbe 0x401bc2
lea eax, [esp + 0x14]
push 0x5c
push eax
call fcn.00473029
add esp, 8
cmp eax, esi
je 0x401bc2
add eax, 2
push str.winlogon.exe
push eax
call fcn.00476593
add esp, 8
test eax, eax
jne 0x401bc2
mov eax, 1
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.00472a79
add esp, 0x21c
ret
lea ecx, [esp + 4]
push ecx
push 8
mov dword [esp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x401bf4
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.00472a79
add esp, 0x21c
ret
mov ecx, dword [esp + 4]
lea edx, [esp + 8]
push edx
push 4
lea eax, [esp + 0x18]
push eax
push 0x14
push ecx
mov dword [esp + 0x1c], esi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x401c20
cmp dword [esp + 8], 4
jne 0x401c20
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x21c]
mov eax, esi
pop esi
xor ecx, esp
call fcn.00472a79
add esp, 0x21c
ret

Function at 0x4028c0
Capabilities:
Get session user name

Disassembly:
sub esp, 0x210
mov eax, dword [0x4c1280]
xor eax, esp
mov dword [esp + 0x20c], eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xe]
push ecx
mov dword [esp + 0xc], 0x104
mov word [esp + 0x10], ax
call fcn.00472990
add esp, 0xc
lea edx, [esp]
push edx
lea eax, [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x402935
lea ecx, [esp + 4]
push str.SYSTEM
push ecx
call fcn.00476593
add esp, 8
neg eax
sbb eax, eax
inc eax
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00472a79
add esp, 0x210
ret
mov ecx, dword [esp + 0x20c]
xor ecx, esp
xor eax, eax
call fcn.00472a79
add esp, 0x210
ret
Function at 0x4083f0
Capabilities:
Print debug messages

Disassembly:
push ecx
mov eax, dword [0x4c1280]
xor eax, esp
mov dword [esp], eax
push edi
xor edi, edi
cmp dword [esi + 8], edi
je 0x408413
lea eax, [edi + 1]
pop edi
mov ecx, dword [esp]
xor ecx, esp
call fcn.00472a79
pop ecx
ret
push str.ObCtrl.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 8], eax
test eax, eax
je 0x40845c
push str.GetComInstance
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40845c
call eax
mov dword [esi + 4], eax
test eax, eax
je 0x40845c
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
lea ecx, [esi + 0xc]
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x408478
push str.cant_open_ctrl_device_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [esi + 8]
mov dword [esi + 4], 0
test eax, eax
je 0x408478
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esi + 8], 0
mov ecx, dword [esp + 4]
mov eax, edi
pop edi
xor ecx, esp
call fcn.00472a79
pop ecx
ret

Function at 0x4093a0
Capabilities:
Parse pe header
Read file on windows

Disassembly:
sub esp, 8
push esi
push edi
push 0x20
push 0x4b15ec
push eax
xor edi, edi
call fcn.004754fb
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4094d4
push edi
push edi
push esi
call fcn.00475476
add esp, 0xc
test eax, eax
jne 0x4094cb
push esi
push 1
lea ecx, [esp + 0x14]
push 2
push ecx
call fcn.0047a301
add esp, 0x10
cmp eax, 1
jne 0x4094cb
mov eax, dword [esp + 0xc]
cmp al, 0x4d
jne 0x4094cb
cmp ah, 0x5a
jne 0x4094cb
push edi
push 0x3c
push esi
call fcn.00475476
add esp, 0xc
test eax, eax
jne 0x4094cb
lea edx, [esp + 8]
push edx
push 0x4b281c
push esi
call fcn.0047a6f5
push esi
call fcn.0047a715
add esp, 0x10
test eax, eax
jne 0x4094cb
lea eax, [esp + 9]
push eax
push 0x4b281c
push esi
call fcn.0047a6f5
movzx eax, byte [esp + 0x15]
movzx ecx, byte [esp + 0x14]
shl eax, 8
add eax, ecx
push edi
push eax
push esi
call fcn.00475476
add esp, 0x18
test eax, eax
jne 0x4094cb
lea edx, [esp + 0xc]
push edx
push 0x4b281c
push esi
call fcn.0047a6f5
push esi
call fcn.0047a715
add esp, 0x10
test eax, eax
jne 0x4094cb
lea eax, [esp + 0xd]
push eax
push 0x4b281c
push esi
call fcn.0047a6f5
mov eax, dword [esp + 0x18]
add esp, 0xc
cmp al, 0x50
jne 0x4094b5
cmp ah, 0x45
je 0x4094c6
push esi
call fcn.00474bde
add esp, 4
mov eax, edi
pop edi
pop esi
add esp, 8
ret
cmp al, 0x4c
je 0x40949f
cmp al, 0x4d
je 0x40949f
cmp al, 0x4e
jne 0x4094cb
cmp ah, 0x45
jne 0x4094cb
mov edi, 1
push esi
call fcn.00474bde
add esp, 4
mov eax, edi
pop edi
pop esi
add esp, 8
ret