joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405990
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x43b512
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x44aba4]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov edi, dword [esp + 0x28]
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [edi], 0x440ddc
mov dword [edi + 0x54], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
lea esi, [edi + 4]
push esi
mov dword [esp + 0x24], ebx
push edi
mov dword [esp + 0x1c], 1
call fcn.00405dd0
mov dword [esp + 0x20], 1
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push esi
mov dword [edi + ecx], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
call fcn.004066e0
lea edx, [esi + 8]
mov dword [esi + 0x10], edx
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [esi + 0x48], bl
mov byte [esi + 0x41], bl
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], ebx
mov eax, dword [esi + 0x24]
mov dword [eax], ebx
mov ecx, dword [esi + 0x34]
mov dword [ecx], ebx
mov edx, dword [esi + 0x10]
mov dword [edx], ebx
mov eax, dword [esi + 0x20]
mov edx, dword [0x44f250]
mov dword [eax], ebx
mov ecx, dword [esi + 0x30]
mov dword [ecx], ebx
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x44], edx
mov dword [esi + 0x3c], ebx
mov ecx, dword [esp + 0x2c]
push 0x22
mov byte [esp + 0x24], 2
call fcn.00405f10
test eax, eax
jne 0x405a92
mov eax, dword [edi]
mov ecx, dword [eax + 4]
mov eax, dword [ecx + edi + 8]
add ecx, edi
or eax, 2
cmp dword [ecx + 0x28], ebx
jne 0x405a81
or eax, 4
and eax, 0x17
test dword [ecx + 0xc], eax
mov dword [ecx + 8], eax
je 0x405a92
push ebx
call fcn.00407a80
mov eax, edi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x14
ret 8
Function at 0x4066e0
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x43a84b
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x44aba4]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov esi, dword [esp + 0x24]
lea ecx, [esi + 4]
mov dword [esi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.00438120
push 4
mov dword [esp + 0x20], 0
call fcn.00415b45
mov edi, eax
add esp, 4
test edi, edi
je 0x406760
call fcn.0043859b
mov dword [edi], eax
call fcn.004383cf
push 0
lea ecx, [esp + 0x14]
mov ebx, eax
call fcn.00438955
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x406755
add eax, 1
mov dword [ebx + 4], eax
lea ecx, [esp + 0x10]
call fcn.00438976
jmp 0x406762
xor edi, edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi + 0x38], edi
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov eax, esi
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret 4

Function at 0x4081d0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esi]
mov ecx, dword [esi + 4]
push ebx
mov eax, 0xc6ef3720
push edi
lea esp, [esp]
mov edi, edx
sar edi, 5
mov ebx, edx
shl ebx, 4
xor edi, ebx
mov ebx, eax
sar ebx, 0xb
and ebx, 3
add edi, dword [ebx*4 + 0x44c308]
mov ebx, eax
xor ebx, edx
add edi, ebx
sub ecx, edi
mov edi, ecx
sar edi, 5
mov ebx, ecx
shl ebx, 4
xor edi, ebx
add eax, 0x61c88647
mov ebx, eax
and ebx, 3
add edi, dword [ebx*4 + 0x44c308]
mov ebx, eax
xor ebx, ecx
add edi, ebx
sub edx, edi
test eax, eax
jne 0x4081e0
pop edi
mov dword [esi], edx
mov dword [esi + 4], ecx
pop ebx
ret
Function at 0x40a3e0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
push esi
push edi
mov edi, eax
mov esi, edx
jne 0x40a3ef
pop edi
xor eax, eax
pop esi
ret
cmp edi, 8
not esi
jb 0x40a4d7
push ebp
mov ebp, edi
shr ebp, 3
movzx edx, byte [ecx]
xor edx, esi
and edx, 0xff
add ecx, 1
mov eax, esi
shr eax, 8
xor eax, dword [edx*4 + 0x4423f8]
movzx edx, byte [ecx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4423f8]
movzx edx, byte [ecx + 1]
xor edx, eax
and edx, 0xff
add ecx, 1
shr eax, 8
xor eax, dword [edx*4 + 0x4423f8]
movzx edx, byte [ecx + 1]
xor edx, eax
add ecx, 1
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4423f8]
movzx edx, byte [ecx + 1]
xor edx, eax
add ecx, 1
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4423f8]
movzx edx, byte [ecx + 1]
xor edx, eax
add ecx, 1
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4423f8]
movzx edx, byte [ecx + 1]
add ecx, 1
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4423f8]
movzx edx, byte [ecx + 1]
add ecx, 1
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4423f8]
add ecx, 1
sub edi, 8
sub ebp, 1
mov esi, eax
jne 0x40a400
pop ebp
test edi, edi
je 0x40a4fc
jmp 0x40a4e0
movzx eax, byte [ecx]
xor eax, esi
and eax, 0xff
shr esi, 8
xor esi, dword [eax*4 + 0x4423f8]
add ecx, 1
sub edi, 1
jne 0x40a4e0
mov eax, esi
pop edi
not eax
pop esi
ret

Function at 0x40a510
Capabilities:
Hash data with crc32

Disassembly:
mov eax, dword [edx]
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x4423f8]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
add eax, 1
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x4423f8]
mov dword [edx + 8], ecx
ret

Function at 0x40a560
Capabilities:
Hash data with crc32

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
xor al, bl
movzx ebx, al
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x4423f8]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
add edx, 1
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x4423f8]
pop ebx
mov dword [esi + 8], ecx
ret

Function at 0x40ad20
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ebx
imul esi, dword [esp + 8]
cmp byte [edi], 0
je 0x40ad52
mov ecx, dword [edi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40ad48
mov byte [edi + 8], 1
mov eax, dword [esp + 8]
xor edx, edx
div ebx
pop esi
ret
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x18]
push ebp
lea ebp, [ecx + esi]
cmp ebp, eax
pop ebp
jbe 0x40ad65
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0x14]
push esi
add eax, ecx
push eax
push edx
call fcn.004293e0
add dword [edi + 0x1c], esi
mov eax, esi
add esp, 0xc
xor edx, edx
div ebx
pop esi
ret
Function at 0x40ad80
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
cmp byte [esi], 0
push edi
mov edi, 1
je 0x40adb3
mov edx, dword [esi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push edi
lea ecx, [esp + 0x13]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40adad
mov byte [esi + 8], 1
mov edi, dword [esp + 8]
jmp 0x40addf
mov eax, dword [esi + 0x18]
push ebx
mov ebx, dword [esi + 0x1c]
lea ecx, [ebx + 1]
cmp ecx, eax
jbe 0x40adc5
sub eax, ebx
mov edi, eax
mov edx, dword [esi + 0x14]
push edi
add edx, ebx
push edx
lea eax, [esp + 0x13]
push eax
call fcn.004293e0
add esp, 0xc
add ebx, edi
mov dword [esi + 0x1c], ebx
pop ebx
cmp edi, 1
pop edi
jne 0x40adf6
movzx ecx, byte [esp + 3]
mov edx, dword [esp + 0xc]
mov dword [edx], ecx
xor eax, eax
add esp, 8
ret
cmp byte [esi], 0
je 0x40adf0
cmp byte [esi + 8], 0
je 0x40adf0
or eax, 0xffffffff
add esp, 8
ret
Function at 0x40aee0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
cmp byte [esi], 0
je 0x40af25
cmp byte [esi + 1], 0
je 0x40af2d
mov eax, dword [esi + 4]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebp
je 0x40af42
cmp byte [esi + 1], 0
je 0x40af34
mov edx, dword [esi + 4]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
sub ebp, dword [esi + 0xc]
mov dword [esp + 4], ebp
jmp 0x40af4b
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
jmp 0x40aefe
or eax, 0xffffffff
add esp, 0x18
ret
mov dword [esp + 4], 0
mov ebp, dword [esp + 4]
jmp 0x40af4b
mov eax, dword [esi + 0x1c]
mov dword [esp + 4], eax
mov ebp, eax
push edi
mov edi, 0xffff
cmp ebp, edi
mov dword [esp + 0xc], edi
jae 0x40af5f
mov dword [esp + 0xc], ebp
mov edi, ebp
push ebx
push 0x404
call fcn.00422af3
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40af7d
pop ebx
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret
mov eax, 4
cmp edi, eax
mov dword [esp + 0x18], 0xffffffff
jbe 0x40b093
jmp 0x40afa0
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0xc]
add eax, 0x400
cmp eax, edi
mov dword [esp + 0x14], edi
ja 0x40afb1
mov dword [esp + 0x14], eax
mov eax, ebp
sub eax, dword [esp + 0x14]
sub ebp, eax
cmp ebp, 0x404
mov dword [esp + 0x20], eax
jbe 0x40afca
mov ebp, 0x404
cmp byte [esi], 0
je 0x40afef
cmp byte [esi + 1], 0
je 0x40b093
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40aff2
mov dword [esi + 0x1c], eax
cmp byte [esi], 0
mov edi, ebp
je 0x40b01a
mov ecx, dword [esi + 4]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40b014
mov byte [esi + 8], 1
mov eax, dword [esp + 0x1c]
jmp 0x40b040
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea edx, [eax + ebp]
cmp edx, ecx
jbe 0x40b02b
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0x14]
push edi
add ecx, eax
push ecx
push ebx
call fcn.004293e0
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div ebp
cmp eax, 1
jne 0x40b093
lea eax, [ebp - 3]
test eax, eax
jl 0x40b07e
sub eax, 1
cmp byte [eax + ebx], 0x50
jne 0x40b06e
cmp byte [eax + ebx + 1], 0x4b
jne 0x40b06e
cmp byte [eax + ebx + 2], 5
jne 0x40b06e
cmp byte [eax + ebx + 3], 6
je 0x40b074
test eax, eax
jge 0x40b050
jmp 0x40b07e
mov edx, dword [esp + 0x20]
add eax, edx
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
jne 0x40b093
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
jb 0x40af94
push ebx
call fcn.004226b3
mov eax, dword [esp + 0x1c]
add esp, 4
pop ebx
pop edi
pop ebp
add esp, 0x18
ret
Function at 0x40b9c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x40b9de
pop edi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 0xc
ret
cmp dword [edi + 0x18], ebx
je 0x40b9d2
cmp dword [edi + 0x7c], ebx
je 0x40b9ed
call fcn.0040bdb0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.0040b730
add esp, 0xc
test eax, eax
je 0x40ba14
pop edi
pop ebp
mov eax, 0xffffff99
pop ebx
add esp, 0xc
ret
push esi
push 0x84
call fcn.00422af3
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40ba55
push 0x4000
call fcn.00422af3
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
mov dword [esi], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ebx
jne 0x40ba62
push esi
call fcn.004226b3
add esp, 4
pop esi
pop edi
pop ebp
mov eax, 0xffffff98
pop ebx
add esp, 0xc
ret
mov dword [esi + 0x40], ebx
mov ecx, dword [edi + 0x3c]
xor eax, eax
cmp dword [edi + 0x34], ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x50], ebx
mov edx, dword [edi + 0x34]
sete al
mov dword [esi + 0x64], edx
mov ecx, dword [edi]
mov dword [esi + 0x60], ecx
mov edx, dword [edi + 0xc]
mov dword [esi + 0x68], edx
mov dword [esi + 0x18], ebx
cmp eax, ebx
jne 0x40baaa
lea eax, [esi + 4]
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.0040a820
test eax, eax
jne 0x40baaa
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov dword [esi + 0x58], eax
mov ecx, dword [edi + 0x44]
mov dword [esi + 0x5c], ecx
mov dl, byte [edi + 0x30]
and dl, 1
mov byte [esi + 0x6c], dl
mov eax, dword [edi + 0x30]
shr eax, 3
test al, 1
je 0x40bad4
mov cl, byte [edi + 0x39]
mov byte [esi + 0x80], cl
jmp 0x40badd
mov dl, byte [edi + 0x3f]
mov byte [esi + 0x80], dl
mov al, byte [esi + 0x6c]
neg al
lea edx, [esi + 0x70]
mov dword [edx], 0x12345678
mov dword [esi + 0x74], 0x23456789
mov dword [esi + 0x78], 0x34567890
sbb eax, eax
and eax, 0xc
cmp ebp, ebx
mov dword [esi + 0x7c], eax
je 0x40bb16
mov cl, byte [ebp]
cmp cl, bl
je 0x40bb16
call fcn.0040a510
add ebp, 1
jne 0x40bb05
mov ecx, dword [edi + 0x78]
mov edx, dword [esp + 0x18]
lea eax, [ecx + edx + 0x1e]
mov dword [esi + 0x3c], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x7c], esi
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
Function at 0x40bea0
Capabilities:
Get common file path

Disassembly:
push ecx
cmp dword [esi], 0
push edi
jne 0x40bf30
cmp dword [esi + 4], 0xffffffff
jne 0x40bf30
lea edi, [esi + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40bec8
sub eax, edx
mov al, byte [eax + esi + 0x13f]
cmp al, 0x5c
je 0x40bef8
cmp al, 0x2f
je 0x40bef8
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x40bee5
mov ax, word [0x4429f0]
mov word [edi], ax
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push ecx
call fcn.0040ac80
add esp, 4
test eax, eax
jne 0x40bf16
mov eax, dword [esp + 0xc]
pop edi
pop ecx
ret 4
call fcn.0040b0b0
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x200
pop edi
pop ecx
ret 4
mov eax, 0x1000000
pop edi
pop ecx
ret 4

Function at 0x40c4f0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x20c
mov eax, dword [0x44aba4]
xor eax, esp
mov dword [esp + 0x208], eax
push ebp
mov ebp, dword [esp + 0x218]
push edi
mov edi, dword [esp + 0x218]
test edi, edi
je 0x40c52d
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40c52d
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [ebp]
test al, al
je 0x40c5ed
push esi
mov esi, ebp
mov ecx, ebp
lea ecx, [ecx]
cmp al, 0x2f
je 0x40c548
cmp al, 0x5c
jne 0x40c54a
mov esi, ecx
mov al, byte [ecx + 1]
add ecx, 1
test al, al
jne 0x40c540
cmp esi, ebp
je 0x40c582
sub esi, ebp
push esi
lea eax, [esp + 0x114]
push ebp
push eax
call fcn.004293e0
lea ecx, [esp + 0x11c]
push ecx
push edi
mov byte [esp + esi + 0x124], 0
call fcn.0040c4f0
add esp, 0x14
test edi, edi
mov byte [esp + 0xc], 0
je 0x40c59f
lea edx, [esp + 0xc]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x40c593
mov eax, ebp
mov edx, ebp
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c5a3
lea edi, [esp + 0xc]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x40c5b5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0xc]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
pop esi
jne 0x40c5ed
push 0
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [esp + 0x210]
pop edi
pop ebp
xor ecx, esp
call fcn.004200b3
add esp, 0x20c
ret
Function at 0x40e040
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40e059
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40e094
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40e090
lea ebx, [ebx]
cmp esi, eax
jae 0x40e094
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x40e080
cmp esi, eax
jb 0x40e09a
pop esi
pop edi
xor eax, eax
pop ebx
ret
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x40e0b0
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x43a978
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x44aba4]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
test ecx, ecx
je 0x40e196
add eax, 0xfffffff0
push eax
call fcn.004156a0
lea ecx, [eax + 0x10]
add esp, 4
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], 0
mov edx, dword [ecx - 0xc]
lea eax, [edx - 1]
test eax, eax
jl 0x40e25d
cmp eax, edx
jg 0x40e25d
mov al, byte [eax + ecx]
cmp al, 0x5c
je 0x40e12d
push 1
push 0x4429f0
lea ecx, [esp + 0x2c]
call fcn.004149f0
cmp byte [esp + 0x28], 1
lea ecx, [esp + 0x24]
jne 0x40e14d
push 0x17
push str.UpdatePackageConfig.zip
call fcn.004149f0
push 0x442e34
push 0x69
jmp 0x40e160
push 0x11
push str.UpdatePackage.zip
call fcn.004149f0
push 0x442e34
push 0x66
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x40e1ab
mov dword [esp + 0x1c], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e196
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
je 0x40e16e
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40e16e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
jne 0x40e1f2
lea ecx, [esp + 0x24]
call fcn.0040ddf0
xor al, al
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov ecx, dword [esp + 0x24]
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40e1d4
push 0
lea edx, [esp + 0x14]
push edx
push ebx
push edi
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e1d4
cmp dword [esp + 0x10], ebx
jne 0x40e1d4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x24]
call fcn.0040ddf0
mov al, 1
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret
push 0x80070057
call fcn.004080e0
int3
Function at 0x410af0
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 4]
push ecx
push 0x28
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x410b25
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenProcessToken_Error:_d_n
call fcn.0042318c
add esp, 8
xor al, al
add esp, 0x1c
ret
lea edx, [esp + 0xc]
push edx
push str.SeDebugPrivilege
push 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x20], 2
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x410b80
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LookupPrivilegeValue_Error:_d_n
call fcn.0042318c
mov eax, dword [esp + 0xc]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
mov edx, dword [esp + 4]
push 0
push 0
push 0x10
lea ecx, [esp + 0x14]
push ecx
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x410bc1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AdjustTokenPrivileges_Error:_d_n
call fcn.0042318c
mov eax, dword [esp + 0xc]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x410c0f
cmp eax, 0x514
je 0x410bf1
push eax
push str.AdjustTokenPrivileges_Unknow_Error:_d_n
call fcn.0042318c
mov eax, dword [esp + 0xc]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
push str.AdjustTokenPrivileges_ERROR_NOT_ALL_ASSIGNED_n
call fcn.0042318c
mov eax, dword [esp + 8]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
add esp, 0x1c
ret
Function at 0x411a60
Capabilities:
Delete directory
Delete file

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov edi, eax
mov eax, dword [edi + 4]
test eax, eax
jne 0x411a78
xor ebp, ebp
mov dword [esp + 0x14], ebp
jmp 0x411a86
mov ebp, dword [edi + 8]
sub ebp, eax
sar ebp, 2
mov dword [esp + 0x14], ebp
jne 0x411a94
mov eax, dword [esp + 0x2c]
cmp dword [eax + 8], 0
je 0x411b7d
xor ebx, ebx
test ebp, ebp
jbe 0x411afa
lea ebx, [ebx]
mov esi, dword [edi + 4]
test esi, esi
je 0x411b78
mov ecx, dword [edi + 8]
mov eax, ecx
sub eax, esi
sar eax, 2
cmp eax, ebx
jbe 0x411b78
cmp esi, ecx
jbe 0x411ac6
call fcn.004208da
mov dword [esp + 0x20], esi
lea esi, [esi + ebx*4]
cmp esi, dword [edi + 8]
ja 0x411ad7
cmp esi, dword [edi + 4]
jae 0x411ae0
call fcn.004208da
mov ebp, dword [esp + 0x14]
cmp esi, dword [edi + 8]
jb 0x411aea
call fcn.004208da
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
add ebx, 1
cmp ebx, ebp
jb 0x411aa0
mov esi, dword [esp + 0x2c]
mov eax, dword [esi + 4]
mov ebp, dword [eax]
mov ebx, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov edi, eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edi
jmp 0x411b20
test esi, esi
je 0x411b2a
cmp esi, dword [esp + 0x2c]
je 0x411b2f
call fcn.004208da
cmp edi, ebp
je 0x411b7d
mov dword [esp + 0x14], esi
lea esi, [esp + 0x14]
mov dword [esp + 0x18], edi
call fcn.00414470
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x411b51
call fcn.004208da
mov esi, dword [esp + 0x18]
cmp esi, dword [edi + 4]
jne 0x411b5f
call fcn.004208da
mov edx, dword [esi + 0x10]
push edx
call ebx
lea esi, [esp + 0x20]
call fcn.00414470
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
jmp 0x411b20
jmp 0x413a60
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret