joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401450
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
push dword [esp + 0xc]
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x40147a
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x14]
test eax, eax
mov dword [ecx], eax
jne 0x40147e
xor eax, eax
pop esi
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [esp + 0x10]
push 1
mov dword [ecx], eax
pop eax
pop esi
ret

Function at 0x401499
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push edi
xor edi, edi
push edi
push 1
push edi
lea eax, [ebp - 4]
push edi
push eax
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call esi
test eax, eax
jne 0x4014da
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x4014ed
push 8
push 1
push edi
lea eax, [ebp - 4]
push edi
push eax
call esi
test eax, eax
je 0x4014ed
lea eax, [ebp - 8]
push eax
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x4014f1
xor eax, eax
jmp 0x401503
cmp dword [ebp - 4], edi
je 0x401500
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 8]
pop edi
pop esi
leave
ret

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

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..rdata
nop
nop
nop
nop
push 4
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x42e072
mov ebx, 0x407ef8
nop
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x165d56bd
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x42e060
mov eax, section..data
nop
nop
nop
nop
cmp eax, 0
je 0x42e0d2
nop
nop
nop
nop
mov ebx, 0x42cd70
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0x2af90d81
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
loop 0x42e0c0
nop
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x4099a4
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x409a77
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x409a90
push ebx
push 0x409a9c
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.004033b4
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409a24
mov al, 0x69
call fcn.00409648
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.00409978
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409a2d
call fcn.00409978
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409a7e
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x409b30
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409be4
jmp 0x409bd9
cmp dword [esi + 0x10], 0x1000
jne 0x409bc5
test byte [esi + 0x15], 1
jne 0x409bc5
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x409b84
cmp eax, 2
je 0x409b84
cmp eax, 0x10
je 0x409b84
cmp eax, 0x20
jne 0x409b99
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x409b99
mov bl, 1
xor ebp, ebp
jmp 0x409baa
mov eax, dword [esi]
add eax, ebp
call fcn.00409b28
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x409b9d
test bl, bl
je 0x409bc5
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409be4
mov eax, dword [esi + 4]
cmp eax, edi
je 0x409b5c
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x91b3b8
Capabilities:
Encode data using xor

Disassembly:
pushal
call 0x91b3be
pop ebp
sub ebp, 6
sub ebp, 0x51b3b8
jmp 0x91b41c
jmp 0x91b425
mov eax, 0x51b3b8
add eax, ebp
add eax, 0x93
mov ecx, 0x633
mov edx, 0xe763d3b0
xor byte [eax], dl
inc eax
dec ecx
jne 0x91b43c
jmp 0x91b44f
invalid
Function at 0x4013ca
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [0x408054], 1
mov dword [0x408058], 1
mov dword [0x40805c], 1
mov dword [0x408048], 1
mov dword [ebp - 4], 0x400000
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x401415
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x401438
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
movzx eax, ax
cmp eax, 0x10b
je 0x40145a
cmp eax, 0x20b
je 0x40147f
jmp 0x4014aa
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
cmp eax, 0xe
ja 0x40146c
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x4014af
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, 0xe
ja 0x401497
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x4014af
mov eax, 0
leave
ret

Function at 0x401cc8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
lea eax, [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [esp], 2
call fcn.00402d18
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov ebx, dword [ebp - 0xc]
mov dword [esp], 2
call fcn.00402d18
mov dword [esp + 8], ebx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort

Function at 0x402818
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x402837
mov eax, 0
jmp 0x40287b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x40285a
mov eax, 0
jmp 0x40287b
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
cmp ax, 0x10b
je 0x402876
mov eax, 0
jmp 0x40287b
mov eax, 1
leave
ret
Function at 0x40287d
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0x14]
movzx edx, ax
mov eax, dword [ebp - 0xc]
add eax, edx
add eax, 0x18
mov dword [ebp - 4], eax
jmp 0x4028dc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
cmp dword [ebp + 0xc], eax
jb 0x4028d4
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
add eax, edx
cmp dword [ebp + 0xc], eax
jae 0x4028d4
mov eax, dword [ebp - 4]
jmp 0x4028f0
add dword [ebp - 8], 1
add dword [ebp - 4], 0x28
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 8], eax
jb 0x4028b1
mov eax, 0
leave
ret

Function at 0x402e98
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cmp dword [0x4040e0], 0
jne 0x402fde
push ebp
xor ecx, ecx
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 0xc]
xor eax, eax
mov esi, dword [edx + 0x18]
test esi, esi
je 0x402efd
mov ecx, dword [esi + 0x3c]
mov ecx, dword [esi + ecx + 0x78]
test ecx, ecx
je 0x402ef7
lea eax, [esi + ecx]
mov ebx, dword [eax + 0xc]
add ebx, esi
mov ecx, dword [ebx]
or ecx, 0x20202020
cmp ecx, 0x6c64746e
jne 0x402ef7
mov ecx, dword [ebx + 4]
or ecx, 0x20202020
cmp ecx, 0x6c642e6c
je 0x402f09
mov edx, dword [edx]
mov ecx, esi
jmp 0x402ebc
xor edx, edx
test eax, eax
je 0x402fd4
mov esi, ecx
mov edx, dword [eax + 0x20]
mov edi, dword [eax + 0x24]
mov dword [0x4050a4], esi
xor ebx, ebx
mov ebp, dword [eax + 0x1c]
add edi, esi
add edx, esi
mov dword [esp + 8], edi
mov edi, dword [eax + 0x18]
add ebp, esi
mov dword [esp + 4], edx
dec edi
mov edx, dword [esp + 4]
mov eax, dword [edx + edi*4]
add eax, esi
cmp word [eax], 0x775a
jne 0x402f72
mov dword [esp], eax
lea ecx, [ebx*8 + 0x4040e4]
mov dword [esp + 0xc], ecx
call fcn.00402e78
mov ecx, dword [esp + 0xc]
mov dword [ebx*8 + 0x4040e4], eax
mov eax, dword [esp + 8]
inc ebx
movzx eax, word [eax + edi*2]
mov eax, dword [ebp + eax*4]
mov dword [ecx + 4], eax
cmp ebx, 0x1f4
je 0x402f7d
lea eax, [edi - 1]
test edi, edi
je 0x402f7d
mov edi, eax
jmp 0x402f2c
mov dword [0x4040e0], ebx
dec ebx
test ebx, ebx
je 0x402fcf
xor eax, eax
mov edx, dword [eax*8 + 0x4040e8]
inc eax
mov ecx, dword [eax*8 + 0x4040e8]
cmp edx, ecx
ja 0x402fa3
cmp eax, ebx
jb 0x402f8a
jmp 0x402f83
mov esi, dword [eax*8 + 0x4040dc]
mov edi, dword [eax*8 + 0x4040e4]
mov dword [eax*8 + 0x4040e0], ecx
mov dword [eax*8 + 0x4040e8], edx
mov dword [eax*8 + 0x4040dc], edi
mov dword [eax*8 + 0x4040e4], esi
jmp 0x402f9d
mov edx, 1
add esp, 0x10
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, 1
mov eax, edx
ret
Function at 0x4031d8
Capabilities:
Get local ipv4 addresses
Get mac address on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
lea esi, [esp + 0x20]
mov dword [esp + 0xc], 0
mov edi, dword [esp + 0x50]
mov dword [esp + 0x10], esi
mov eax, dword [0x408040]
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0x20], 0
call fcn.0040190c
sub esp, 0x14
cmp eax, 0x6f
jne 0x4032c5
mov eax, dword [esp + 0x20]
mov dword [esp], 0x40
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
push ecx
push ecx
test eax, eax
je 0x4032c5
mov dword [esp + 0x10], esi
mov esi, ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0040190c
sub esp, 0x14
lea ebp, [esp + 0x26]
cmp dword [esi + 0x34], 6
jne 0x4032b4
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x26], eax
mov ax, word [esi + 0x30]
mov dword [esp + 8], 3
mov dword [esp + 4], ebp
mov dword [esp], edi
mov word [esp + 0x2a], ax
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x4032b4
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov al, 1
push edx
jmp 0x4032c7
mov esi, dword [esi + 8]
test esi, esi
jne 0x403278
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push eax
xor eax, eax
mov edx, dword [esp + 0x2c]
sub edx, dword [0x408040]
je 0x4032d8
call fcn.00401a10
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x403374
Capabilities:
Check for unmoving mouse cursor

Disassembly:
push ebx
sub esp, 0x38
mov ebx, dword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [0x408040]
mov dword [esp + 0x2c], eax
xor eax, eax
lea eax, [esp + 0x1c]
mov dword [esp], eax
call ebx
push eax
mov dword [esp], 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push edx
lea eax, [esp + 0x24]
mov dword [esp], eax
call ebx
xor eax, eax
push ecx
mov edx, dword [esp + 0x24]
cmp dword [esp + 0x1c], edx
jne 0x4033c2
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x20], eax
sete al
mov ecx, dword [esp + 0x2c]
sub ecx, dword [0x408040]
je 0x4033d3
call fcn.00401a10
add esp, 0x38
pop ebx
ret

Function at 0x4033d8
Capabilities:
Enumerate processes

Disassembly:
push edi
push esi
push ebx
sub esp, 0x140
mov dword [esp + 4], 0
mov edi, dword [esp + 0x150]
mov eax, dword [0x408040]
mov dword [esp + 0x13c], eax
xor eax, eax
mov dword [esp], 2
mov dword [esp + 0x14], 0x22c
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
push ecx
mov ebx, eax
push ecx
lea esi, [esp + 0x14]
mov dword [esp], eax
mov dword [esp + 4], esi
call sub.KERNEL32.dll_Process32First
push edx
push edx
test eax, eax
jne 0x403430
xor eax, eax
jmp 0x40345a
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.KERNEL32.dll_Process32Next
push edx
push edx
test eax, eax
je 0x40342c
lea eax, [esp + 0x38]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll__stricmp
test eax, eax
jne 0x403430
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x13c]
sub edx, dword [0x408040]
je 0x40346e
call fcn.00401a10
add esp, 0x140
pop ebx
pop esi
pop edi
ret
Function at 0x403478
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x4c
mov eax, dword [0x408040]
mov dword [esp + 0x3c], eax
xor eax, eax
lea eax, [esp + 0x18]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push eax
cmp dword [esp + 0x2c], 1
setbe al
mov edx, dword [esp + 0x3c]
sub edx, dword [0x408040]
je 0x4034ad
call fcn.00401a10
add esp, 0x4c
ret

Function at 0x40352c
Capabilities:
Get memory capacity

Disassembly:
sub esp, 0x6c
mov eax, dword [0x408040]
mov dword [esp + 0x5c], eax
xor eax, eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x40
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
push eax
mov eax, 0x7fffffff
cmp eax, dword [esp + 0x20]
mov eax, 0
sbb eax, dword [esp + 0x24]
setae al
mov edx, dword [esp + 0x5c]
sub edx, dword [0x408040]
je 0x403576
call fcn.00401a10
add esp, 0x6c
ret

Function at 0x4037b4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push edi
mov ecx, 8
push esi
mov esi, 0x406233
push ebx
sub esp, 0x250
mov eax, dword [0x408040]
mov dword [esp + 0x24c], eax
xor eax, eax
lea edi, [esp + 0x2c]
mov ebx, dword [esp + 0x260]
rep movsd dword es:[edi], dword [esi]
mov edx, eax
mov byte [esp + eax + 0x14c], al
and edx, 0x1f
mov dl, byte [esp + edx + 0x2c]
mov byte [esp + eax + 0x4c], dl
inc eax
cmp eax, 0x100
jne 0x4037e2
xor esi, esi
xor edi, edi
movzx eax, byte [esp + esi + 0x14c]
add eax, edi
add al, byte [esp + esi + 0x4c]
movzx edi, al
lea eax, [esp + 0x14c]
add eax, esi
inc esi
mov dword [esp + 4], eax
lea eax, [esp + 0x14c]
add eax, edi
mov dword [esp], eax
call fcn.00403134
cmp esi, 0x100
jne 0x403802
mov edi, dword [esp + 0x264]
xor esi, esi
xor eax, eax
add edi, ebx
cmp edi, ebx
je 0x403899
lea edx, [esi + 1]
lea ecx, [esp + 0x14c]
movzx esi, dl
add al, byte [esp + esi + 0x14c]
movzx eax, al
lea edx, [ecx + eax]
mov dword [esp + 0x1c], eax
mov dword [esp + 4], edx
lea edx, [ecx + esi]
mov dword [esp], edx
call fcn.00403134
mov eax, dword [esp + 0x1c]
mov dl, byte [esp + eax + 0x14c]
add dl, byte [esp + esi + 0x14c]
movzx edx, dl
mov dl, byte [esp + edx + 0x14c]
xor byte [ebx], dl
inc ebx
jmp 0x403847
mov eax, dword [esp + 0x24c]
sub eax, dword [0x408040]
je 0x4038ad
call fcn.00401a10
mov eax, dword [esp + 0x264]
add esp, 0x250
pop ebx
pop esi
pop edi
ret
Function at 0x4038c0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x15c]
mov esi, 0x406253
push ebx
sub esp, 0x17c
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x11c], 0
mov eax, dword [0x408040]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov eax, 0x10
mov ecx, eax
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x118]
mov eax, ecx
mov ecx, 0x3f
rep stosd dword es:[edi], eax
movzx edx, byte [ebp + eax - 0x15c]
mov byte [ebp + edx - 0x11c], al
inc eax
cmp eax, 0x40
jne 0x403906
xor edx, edx
test byte [ebp + 0xc], 3
jne 0x403a9e
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
shr edx, 2
cmp byte [ebx + eax - 1], 0x3d
lea edx, [edx + edx*2]
jne 0x40393b
dec edx
mov eax, dword [ebp + 0xc]
cmp byte [ebx + eax - 2], 0x3d
jne 0x403946
dec edx
lea eax, [edx + 0xf]
shr eax, 4
shl eax, 4
call fcn.00402bf4
mov ecx, 0
mov dword [ebp - 0x170], 0
sub esp, eax
test edx, edx
cmovns ecx, edx
mov edi, esp
xor eax, eax
mov dword [ebp - 0x174], esp
xor esi, esi
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x170]
cmp eax, dword [ebp + 0xc]
jb 0x403994
mov esi, dword [ebp - 0x174]
mov edi, ebx
mov ecx, edx
rep movsb byte es:[edi], byte [esi]
jmp 0x403a9e
mov eax, dword [ebp - 0x170]
xor edi, edi
movzx eax, byte [ebx + eax]
cmp al, 0x3d
je 0x4039ac
movzx edi, byte [ebp + eax - 0x11c]
mov dword [ebp - 0x178], 0
mov eax, dword [ebp - 0x170]
movzx eax, byte [ebx + eax + 1]
cmp al, 0x3d
je 0x4039d3
movzx eax, byte [ebp + eax - 0x11c]
mov dword [ebp - 0x178], eax
mov dword [ebp - 0x17c], 0
mov eax, dword [ebp - 0x170]
movzx eax, byte [ebx + eax + 2]
cmp al, 0x3d
je 0x4039fa
movzx eax, byte [ebp + eax - 0x11c]
mov dword [ebp - 0x17c], eax
mov eax, dword [ebp - 0x170]
xor ecx, ecx
add dword [ebp - 0x170], 4
movzx eax, byte [ebx + eax + 3]
cmp al, 0x3d
je 0x403a1c
movzx eax, byte [ebp + eax - 0x11c]
mov ecx, eax
mov dword [ebp - 0x16c], esi
cmp edx, esi
ja 0x403a31
mov esi, dword [ebp - 0x16c]
jmp 0x403978
mov eax, dword [ebp - 0x178]
shl edi, 0x12
inc dword [ebp - 0x16c]
shl eax, 0xc
add eax, edi
mov edi, dword [ebp - 0x17c]
shl edi, 6
add eax, edi
mov edi, dword [ebp - 0x174]
add eax, ecx
mov ecx, eax
shr eax, 0x10
mov byte [edi + esi], al
cmp edx, dword [ebp - 0x16c]
jbe 0x403a26
lea eax, [esi + 2]
mov dword [ebp - 0x178], eax
mov eax, edi
mov edi, dword [ebp - 0x16c]
mov byte [eax + edi], ch
lea eax, [esi + 2]
mov dword [ebp - 0x16c], eax
cmp edx, eax
jbe 0x403a26
lea eax, [esi + 3]
mov dword [ebp - 0x16c], eax
mov eax, dword [ebp - 0x174]
mov byte [eax + esi + 2], cl
jmp 0x403a26
mov eax, dword [ebp - 0x1c]
sub eax, dword [0x408040]
je 0x403aae
call fcn.00401a10
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x433005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
call 0x43300c
nop
nop
nop
nop
pop eax
nop
nop
add eax, 0x40a063
sub eax, 0x40a009
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
jl 0x433030
nop
nop
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x401000
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe4
mov eax, dword [0x418004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.Finding_Watchdog_serial_port_n
push 2
mov dword [ebp - 0xc], 0xa0d52
mov byte [ebp - 8], 0
call fcn.00404201
add esp, 4
push eax
call fcn.004012b0
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
mov ebx, 2
push ebx
lea eax, [ebp - 0x2c]
push str..COM_ld
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push ebx
push str.COM_d
call fcn.00401280
add esp, 0x14
lea eax, [ebp - 0x2c]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40122e
push 0x78
lea eax, [ebp - 0xac]
push 0
push eax
call fcn.00402130
add esp, 0xc
mov dword [ebp - 0xb0], 0
xorps xmm0, xmm0
mov dword [ebp - 0xdc], 0x1c
lea eax, [ebp - 0xdc]
movlpd qword [ebp - 0xd8], xmm0
movlpd qword [ebp - 0xd0], xmm0
push eax
push esi
movlpd qword [ebp - 0xc8], xmm0
movups xmmword [ebp - 0xc0], xmm0
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x4010eb
push str.Error_getting_device_state_n
jmp 0x401167
lea eax, [ebp - 0xdc]
mov dword [ebp - 0xd8], 0x2580
push eax
push esi
mov word [ebp - 0xca], 8
mov byte [ebp - 0xc8], 0
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x40111e
push str.Error_setting_device_parameters_n
jmp 0x401167
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xc0], 0x32
push eax
push esi
mov dword [ebp - 0xb8], 0x32
mov dword [ebp - 0xbc], 0xa
mov dword [ebp - 0xb0], 0x32
mov dword [ebp - 0xb4], 0xa
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x40117d
push str.Error_setting_timeouts_n
push 2
call fcn.00404201
add esp, 4
push eax
call fcn.004012b0
add esp, 8
push esi
call edi
push 0
lea eax, [ebp - 0xe4]
push eax
push 3
lea eax, [ebp - 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40119e
push str.Error_Writing_n
jmp 0x4011d5
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
lea eax, [ebp - 0xe0]
mov dword [ebp - 0xe0], 0
push eax
push 0xf
lea eax, [ebp - 0xac]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4011eb
push str.Error_Reading_n
push 2
call fcn.00404201
add esp, 4
push eax
call fcn.004012b0
add esp, 8
push esi
call edi
lea ecx, [ebp - 0xac]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4011f4
sub ecx, edx
cmp ecx, 5
jb 0x40121a
cmp byte [ebp - 0xac], 0x52
jne 0x40121a
push str.is_a_Watchdog_n
call fcn.00401280
add esp, 4
jmp 0x40122e
push 0x416864
call fcn.00401280
add esp, 4
push esi
call edi
test eax, eax
je 0x40124b
inc ebx
cmp ebx, 0x14
jl 0x401044
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004012e6
mov esp, ebp
pop ebp
ret
push str.Error_n
push 2
call fcn.00404201
add esp, 4
push eax
call fcn.004012b0
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 1
pop edi
pop esi
pop ebx
call fcn.004012e6
mov esp, ebp
pop ebp
ret
Function at 0x409280
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00408ef9