joyce8/EMBER2024-capa huggingface dataset:
Function at 0x62241777
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x3000
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._VirtualAlloc_16
sub esp, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0xc]
call eax
nop
leave
ret

Function at 0x62241b60
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x6224603c
call sym._EnterCriticalSection_4
mov ebx, dword [0x62246034]
sub esp, 4
test ebx, ebx
je 0x62241bab
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x62241ba4
test esi, esi
je 0x62241ba4
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x62241b80
mov dword [esp], 0x6224603c
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x62241d90
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], 0x62244148
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x62241de0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x62241eb8
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x62241e1e
cmp eax, 4
jne 0x62241e40
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sym._memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x62241e2e
cmp edx, 4
je 0x62241e2e
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.62241d90
Function at 0x402757
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4027b4
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x4029fa
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ebp + 8], 0
jne 0x402a0a
xor eax, eax
leave
ret
test byte [0x41e9c8], 2
mov dword [ebp - 0x40], 0x40
jne 0x402a5f
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x402a5f
mov ecx, dword [ebp - 0x2c]
xor eax, eax
cmp ecx, eax
ja 0x402a5f
jb 0x402a3b
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 8]
jae 0x402a5f
push 0x2b
call fcn.00402490
push eax
call fcn.00409581
cmp eax, 1
pop ecx
pop ecx
je 0x402a58
or dword [0x41e9c8], 0xffffffff
jmp 0x402a06
or dword [0x41e9c8], 2
xor eax, eax
inc eax
leave
ret

Function at 0x402e9c
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.004014eb
cmp dword [ebp - 4], 1
jg 0x402eba
push 1
lea ecx, [ebp - 0xc]
call fcn.004011b7
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push 1
push dword [ebp - 0xc]
push eax
call esi
test eax, eax
jne 0x402ede
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x402f15
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0xc]
call fcn.00402ad5
push eax
push ebx
call esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.00401184
and word [esi + eax*2], 0
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
call fcn.0040143c
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
pop esi
leave
ret

Function at 0x40331e
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
cmp dword [0x41ea6c], 0
je 0x40332b
xor eax, eax
inc eax
ret
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403341
xor eax, eax
inc eax
pop esi
ret
test al, 0x10
jne 0x40335f
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40335b
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
ret
xor eax, eax
pop esi
ret
push esi
call fcn.00403211
pop ecx
pop esi
ret
Function at 0x403685
Capabilities:
Contain obfuscated stackstrings
Enumerate pe sections

Disassembly:
test ch, bh
add eax, 0x788b0000
cmp al, 3
clc
movzx eax, word [edi + 0x14]
lea esi, [eax + edi + 0x18]
mov dword [ebp - 0x44], esi
call fcn.0040348e
dec edi
sub byte [esi*8 + 0x647b70f], dl
lea eax, [eax + eax*4]
shl eax, 3
sub eax, dword [ebp + 0x10]
add eax, esi
mov dword [ebp - 0xb4], eax
mov dword [ebp - 8], eax
call fcn.0040348e
cli
faddp st(5)

Function at 0x404932
Capabilities:
Contain obfuscated stackstrings

Disassembly:
pop esp
mov byte [ebp - 0x722], 0x51
mov byte [ebp - 0x721], 0x6d
mov byte [ebp - 0x720], 0x4f
mov byte [ebp - 0x71f], 0x52
mov byte [ebp - 0x71e], 0x49
mov byte [ebp - 0x71d], 0x58
mov byte [ebp - 0x71c], 0x5e
mov byte [ebp - 0x71b], 0x49
test ebp, esp
clc
invalid
dec dword [ecx - 0x3a]
test esi, esp
clc
invalid
invalid
cmp eax, 0xffeb17e8
call dword [edx]
mov ch, byte [edi]
sub al, 0x8d
test esp, edx
clc
Function at 0x100d0e60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [0x100f6158]
mov ecx, dword [0x100f6154]
imul eax, eax, 0x26d1
sub esp, 0xc
push ebx
push esi
push edi
push 0x6c3
sub ecx, eax
push 0
mov dword [0x100f6158], ecx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push 0x6c3
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ecx, 0xa
lea ebx, [ebx]
mov dl, byte [0x100f6154]
sub byte [ecx + 0x100f61cc], dl
sub ecx, 2
test ecx, ecx
jg 0x100d0eb0
mov ebx, eax
call fcn.100d0600
movzx ecx, byte [0x100f61d1]
cmp ecx, 0x26f0
jne 0x100d0ef4
movzx edx, word [0x100f6160]
sub edx, dword [0x100f615c]
add edx, 0x26f3
mov dword [0x100f615c], edx
jmp 0x100d0efa
mov edx, dword [0x100f615c]
mov esi, dword [0x100f6164]
movzx edi, byte [0x100f61d4]
mov ecx, edx
sub ecx, esi
add ecx, 3
cmp edi, edx
jb 0x100d0f25
mov edx, 0x2b3
sub edx, eax
add byte [0x100f61db], al
mov dword [0x100f615c], edx
mov edx, dword [0x100f6154]
sub ecx, esi
sub ecx, 3
movzx ebx, cx
mov ecx, edx
sub ecx, dword [ebp + 0xc]
mov dword [esp + 0xc], ebx
add ecx, 4
movzx eax, cx
sub eax, edx
sub eax, 3
mov edi, eax
imul edi, edi, 0x39
sub edi, dword [esp + 0xc]
sub ebx, edx
add cx, di
mov word [0x100f6160], cx
movzx ecx, byte [0x100f61d6]
sub ebx, 3
xor esi, esi
cmp ecx, edx
ja 0x100d0faa
mov ecx, eax
sub ecx, edx
add ecx, 4
mov byte [0x100f61d0], bl
mov ebx, ecx
xor ecx, ecx
push ecx
push 2
push esi
lea edx, [edx + ebx - 0xa5a1]
push eax
mov edi, edx
call fcn.100f3690
add edi, eax
mov eax, esi
adc eax, edx
mov edx, dword [0x100f6154]
mov dword [esp + 0x10], eax
mov eax, edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x14], edi
movzx ecx, byte [0x100f61d1]
cmp ecx, 0x26f0
jne 0x100d0fc5
mov ecx, eax
sub ecx, ebx
add ecx, 0x26f3
mov ebx, ecx
movzx ecx, byte [0x100f61d6]
cmp ecx, edx
ja 0x100d0fdd
sub eax, edx
add eax, 4
mov byte [0x100f61d0], bl
mov ebx, eax
mov ecx, dword [esp + 0xc]
mov eax, 0xa
lea ecx, [ecx + ecx*4]
lea esp, [esp]
sub byte [eax + 0x100f61cc], bl
sub eax, 2
add ebx, ecx
test eax, eax
jg 0x100d0ff0
mov dword [0x10a08098], eax
mov dword [0x100f6158], ebx
call fcn.100d0940
call fcn.10032140
mov edx, dword [0x100f6158]
mov eax, dword [0x100f615c]
imul edx, edx, 0x26d1
sub eax, edx
cmp dword [0x100f6154], 0xf5d8d8e
mov dword [0x100f6158], eax
jne 0x100d103d
mov eax, 0x37c48887
push 0x10a079b0
push 0x6c3
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
imul eax, eax, 0x26d1
mov edx, dword [0x100f615c]
mov ecx, edx
sub ecx, eax
movzx eax, word [0x100f6160]
sub ecx, eax
mov eax, edx
sub eax, dword [0x100f6164]
add ecx, 3
add eax, 3
mov dword [0x100f6158], eax
movzx eax, byte [0x100f61d4]
cmp eax, edx
mov eax, 1
jb 0x100d109c
mov edx, 0x2b3
sub edx, ecx
add byte [0x100f61db], cl
mov dword [0x100f615c], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x100d1110
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x100f5050]
jne 0x100d111a
repz ret
jmp fcn.100d5440
Function at 0x401260
Capabilities:
Encode data using xor
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x40b008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push eax
push 0x104
mov dword [ebp - 0x11c], esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
dec eax
cmp eax, 0x102
ja 0x4012a2
lea eax, [ebp - 0x108]
jmp 0x401417
mov eax, dword [0x408454]
movq xmm0, qword [str.q_tcXSWNIoYPN_]
mov dword [ebp - 0x110], eax
mov ax, word [0x408458]
movq qword [ebp - 0x118], xmm0
mov word [ebp - 0x10c], ax
test ah, ah
je 0x401411
xor ecx, ecx
cmp dword [0x40b6cc], 2
jl 0x4013e7
movaps xmm2, xmmword [0x4084e0]
mov eax, 1
movaps xmm3, xmmword [0x408520]
movaps xmm1, xmm2
punpckldq xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
mov ecx, 8
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
movd xmm4, eax
mov eax, 0x1f
psrad xmm1, xmm4
movaps xmm0, xmm1
movd xmm5, eax
psrld xmm0, xmm5
paddd xmm0, xmm1
pmulld xmm0, xmmword [0x408500]
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movaps xmm2, xmmword [0x4084f0]
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
andps xmm1, xmmword [0x408510]
movd xmm0, dword [str.q_tcXSWNIoYPN_]
packuswb xmm1, xmm1
paddb xmm1, xmmword [0x408530]
xorps xmm1, xmm0
movaps xmm0, xmm2
movd dword [ebp - 0x118], xmm1
movaps xmm1, xmm2
punpckldq xmm1, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm4
movaps xmm0, xmm1
psrld xmm0, xmm5
paddd xmm0, xmm1
pmulld xmm0, xmmword [0x408500]
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
andps xmm1, xmmword [0x408510]
movd xmm0, dword [ebp - 0x114]
packuswb xmm1, xmm1
paddb xmm1, xmmword [0x408530]
xorps xmm1, xmm0
movd dword [ebp - 0x114], xmm1
mov eax, 0x94f2095
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dl, cl
movsx eax, al
imul eax, eax, 0x37
sub dl, al
add dl, 0x32
xor byte [ebp + ecx - 0x118], dl
inc ecx
cmp ecx, 0xe
jl 0x4013e7
lea eax, [ebp - 0x118]
push eax
mov ecx, esi
call fcn.00404460
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00406129
mov esp, ebp
pop ebp
ret 4
Function at 0x403b60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x403b8c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x403bb4
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x403bba
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x403c22
jg 0x403bd1
test esi, esi
je 0x403c22
test ecx, ecx
jl 0x403c1d
jg 0x403bdb
test eax, eax
je 0x403c1d
cmp edi, ecx
jg 0x403bef
jl 0x403be5
cmp esi, eax
jae 0x403bef
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x403c25
mov ecx, dword [ebp + 8]
jmp 0x403c2f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x403c49
jg 0x403c2f
test esi, esi
je 0x403c49
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x403c49
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x403c60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 8], esi
push edi
test eax, eax
jg 0x403c92
jl 0x403c85
test ecx, ecx
jne 0x403c92
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x403cac
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edi, ecx
mov eax, dword [eax]
mov dword [esp + 0x10], eax
test eax, eax
je 0x403cff
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [esp + 0x14], edx
mov eax, dword [eax]
test eax, eax
je 0x403d06
mov edi, dword [esp + 0xc]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [esp + 0x14]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [esp + 0x18], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [esp + 0xc]
jmp 0x403d06
lea eax, [ebx + 0x2c]
mov dword [esp + 0x14], eax
cmp dword [ebx + 0x4c], 0
je 0x403d76
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x403d30
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x403d64
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x403d76
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x403d40
test edi, edi
je 0x403d76
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4040f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x40b008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x404120
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406129
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40415c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40415c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406129
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x404233
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x404184
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 0x404190
movsx eax, bl
jmp 0x4041c8
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
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 [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x4041f2
sub eax, 1
je 0x4041f2
sub eax, 2
jne 0x404233
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406129
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x404210
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x404233
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406129
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406129
mov esp, ebp
pop ebp
ret 4
Function at 0x404820
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x40b008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x4048dc
cmp byte [esi + 0x3d], 0
je 0x4048dc
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x4048ca
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x404891
sub eax, 1
je 0x404895
sub eax, 2
jne 0x4048ca
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406129
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4048b3
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4048ca
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406129
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406129
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00406129
mov esp, ebp
pop ebp
ret

Function at 0x406aa4
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x406ae3
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x406ae3
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406ae3
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x406ae3
cmp dword [ecx + 0x74], 0xe
jbe 0x406ae3
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4029d0
Capabilities:
Create process on windows
Enumerate files on windows

Disassembly:
push 0
push 0
push ecx
push str.main_installer.exe
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp dword [0x427730], 0
jbe 0x402a05
cmp dword [0x427734], 0x10
mov ecx, 0x427720
cmovae ecx, dword [0x427720]
jmp fcn.0040d380
ret
Function at 0x404550
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x427024]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x41acd0
movzx eax, cx
xor esi, esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x404633
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x404633
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x404620
push dword [ebp - 8]
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x404620
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x404619
push dword [ebp - 8]
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [ebp - 8], esi
lea eax, [ebp - 8]
push eax
push esi
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x404612
mov ecx, dword [ebp - 8]
call fcn.00402920
mov ecx, dword [ebp - 8]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
test esi, esi
je 0x404612
mov eax, dword [esi + 8]
mov dword [esi + 8], 0
test eax, eax
je 0x404612
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebx
pop edi
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00415b3b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00415b3b
mov esp, ebp
pop ebp
ret