joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406c60
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b2a0
push 0x406b08
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x413ea0], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x413e9c], ecx
shl ecx, 8
add ecx, edx
mov dword [0x413e98], ecx
shr eax, 0x10
mov dword [0x413e94], eax
call fcn.00408c50
test eax, eax
jne 0x406cca
push 0x1c
call fcn.00406e30
add esp, 4
mov dword [ebp - 4], 0
call fcn.00408a50
call fcn.004080e0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x415174], eax
call fcn.004088f0
mov dword [0x413c58], eax
test eax, eax
je 0x406cfd
mov eax, dword [0x415174]
test eax, eax
jne 0x406d07
push 0xffffffffffffffff
call fcn.00408250
add esp, 4
call fcn.00408640
call fcn.00408550
call fcn.00408220
mov esi, dword [0x415174]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x406de6
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x406d4e
test al, al
je 0x406d4e
and eax, 0xff
push eax
call fcn.004084f0
add esp, 4
test eax, eax
je 0x406d28
inc esi
mov dword [ebp - 0x64], esi
jmp 0x406d28
cmp byte [esi], 0x22
jne 0x406d57
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x406d67
cmp al, 0x20
ja 0x406d67
inc esi
mov dword [ebp - 0x64], esi
jmp 0x406d57
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x406d88
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x406d8d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00408250
jmp 0x406dcb
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x406d57
inc esi
mov dword [ebp - 0x64], esi
jmp 0x406de6

Function at 0x406e30
Capabilities:
Terminate process

Disassembly:
cmp dword [0x413c60], 1
jne 0x406e3e
call fcn.00408c90
mov eax, dword [esp + 4]
push eax
call fcn.00408cd0
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x408290
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x413ed0]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x4082af
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x413ecc], 1
mov byte [0x413ec8], bl
jne 0x408309
mov ecx, dword [0x415168]
test ecx, ecx
je 0x4082f7
mov esi, dword [0x415164]
sub esi, 4
cmp esi, ecx
jb 0x4082f7
mov eax, dword [esi]
test eax, eax
je 0x4082f0
call eax
mov ecx, dword [0x415168]
sub esi, 4
cmp esi, ecx
jae 0x4082e2
push 0x40d01c
push 0x40d014
call fcn.00408340
add esp, 8
push 0x40d024
push 0x40d020
call fcn.00408340
add esp, 8
test ebx, ebx
jne 0x408330
push ebp
mov dword [0x413ed0], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x4088f0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x413fe0]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x408932
call edi
mov esi, eax
test esi, esi
je 0x40891c
mov eax, 1
jmp 0x40892d
call ebp
mov ebx, eax
test ebx, ebx
je 0x408a3f
mov eax, 2
mov dword [0x413fe0], eax
cmp eax, 1
jne 0x4089d2
test esi, esi
jne 0x40894b
call edi
mov esi, eax
test esi, esi
je 0x408a3f
cmp word [esi], 0
mov eax, esi
je 0x408965
add eax, 2
cmp word [eax], 0
jne 0x408953
add eax, 2
cmp word [eax], 0
jne 0x408953
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x4089c4
push edi
call fcn.00408170
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4089c4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4089b6
push ebx
call fcn.00408120
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x408a3f
test ebx, ebx
jne 0x4089e3
call ebp
mov ebx, eax
test ebx, ebx
je 0x408a3f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4089fb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4089eb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4089eb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00408170
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x408a1d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x408cd0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40e948
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x408cf4
add eax, 8
inc ebp
cmp eax, 0x40e9d8
jb 0x408ce5
cmp ecx, dword [ebp*8 + 0x40e948]
jne 0x408e9b
mov eax, dword [0x413c60]
cmp eax, 1
je 0x408e5d
test eax, eax
jne 0x408d20
cmp dword [0x40e584], 1
je 0x408e5d
cmp ecx, 0xfc
je 0x408e9b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x408d5b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x408da4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x40b5f4
add ebx, ecx
push ebx
call fcn.00409fe0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b5d4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40e94c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00409f50
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x415060]
test eax, eax
je 0x408e6e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x408e78
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40e94c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x4090b0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x415160]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40925d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x415060]
lea edi, [ecx*4 + 0x415060]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40925d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40911e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x40912f
push 2
push ebp
push eax
call fcn.00408ff0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40928e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x4091d9
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40918a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x409177
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40915a
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40927f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x4091d5
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x409156
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40924e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x409222
cmp eax, 5
jne 0x40920b
mov dword [0x413e8c], eax
mov dword [0x413e88], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.0040a4c0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x409242
cmp byte [ebp], 0x1a
jne 0x409242
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x413e88], 0x1c
jmp 0x409267
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x413e88], 9
pop edi
pop esi
pop ebp
mov dword [0x413e8c], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x4091d5
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4092bf
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x4091d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x4091d9
Function at 0x10003b3b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
pushal
call 0x10003b4a
pop dword [ebp - 0x10]
mov eax, 0x7511049b
sub eax, 0x6510c951
sub dword [ebp - 0x10], eax
mov dword [ebp - 0x20], 0x8bcc1ee8
add dword [ebp - 0x20], 0xc2862663
mov dword [ebp - 0x1c], 0x3863627a
add dword [ebp - 0x1c], 0xf9cfe9cb
mov dword [ebp - 0x18], 0x7152510d
add dword [ebp - 0x18], 0xdaf9f321
mov dword [ebp - 0x14], 0x1792d6b8
sub dword [ebp - 0x14], 0x1792d6b8
lea eax, [ebp - 0x20]
push eax
mov eax, 0xe9331087
add eax, 0x26cd3fbd
add eax, dword [ebp - 0x10]
call dword [eax]
mov dword [ebp - 0x20], 0xd8973e0a
sub dword [ebp - 0x20], 0x6424d4b4
mov dword [ebp - 0x1c], 0xa6d7de91
add dword [ebp - 0x1c], 0x9a9482e4
mov dword [ebp - 0x18], 0xcbca7cf2
sub dword [ebp - 0x18], 0x685b1086
mov dword [ebp - 0x14], 0x38209a41
sub dword [ebp - 0x14], 0x38209a41
lea ebx, [ebp - 0x20]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x10]
call dword [eax]
push 0x40
push 0x1000
push 0x360ce
push 0
call eax
mov ecx, 0xe32aeaad
add ecx, 0x1cd55a63
mov edx, eax
mov ebx, 0x7935812d
add ebx, 0x96cb16d3
add ebx, dword [ebp - 0x10]
mov edi, 0xa49a0ed9
add edi, 0x6035540d
mov esi, dword [ebx]
xor dword [ebp - 0xc], ecx
xor esi, edi
sub dword [ebp - 4], 0x451de406
mov dword [edx], esi
sub dword [ebp - 4], 0x556936b2
add edx, 0x4c874048
sub edx, 0x4c874044
add ebx, 0xcc2d0a31
sub ebx, 0xcc2d0a2d
loop 0x10003c67
add eax, 0xff1a237c
sub eax, 0xff191c69
mov ebx, eax
add eax, 5
mov ecx, 0xbadad23
add ecx, 0x45252dd
add ecx, dword [ebp - 0x10]
call ebx
leave
ret
Function at 0x40632d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
pushal
call 0x40633c
pop dword [ebp - 0x38]
mov eax, 0x26f28ab0
add eax, 0xd94dd88c
sub dword [ebp - 0x38], eax
mov dword [ebp - 0x48], 0x89e1bf55
sub dword [ebp - 0x48], 0x3b8f7a0a
mov dword [ebp - 0x44], 0x48444fb8
sub dword [ebp - 0x44], 0x16110373
mov dword [ebp - 0x40], 0xfd012451
add dword [ebp - 0x40], 0x4f4b1fdd
mov dword [ebp - 0x3c], 0x3fe4262
add dword [ebp - 0x3c], 0xfc01bd9e
lea eax, [ebp - 0x48]
push eax
mov eax, 0x686ef7d1
add eax, 0x97d1788f
add eax, dword [ebp - 0x38]
call dword [eax]
mov dword [ebp - 0x48], 0x1bf8bbd
add dword [ebp - 0x48], 0x72b2dd99
mov dword [ebp - 0x44], 0x28b12a7a
sub dword [ebp - 0x44], 0xe744c905
mov dword [ebp - 0x40], 0x6fe98
add dword [ebp - 0x40], 0x63686dd4
mov dword [ebp - 0x3c], 0xd15118b3
sub dword [ebp - 0x3c], 0xd15118b3
lea ebx, [ebp - 0x48]
push ebx
push eax
mov eax, 0x1191ac5c
add eax, 0xeeaec4a4
add eax, dword [ebp - 0x38]
call dword [eax]
push 0x40
push 0x1000
push 0x3423d
push 0
call eax
mov ecx, 0x9fc59fa9
add ecx, 0x603a9e6d
xor esi, esi
add esi, eax
mov edx, 0x14b43823
add edx, 0xeb8cc7dd
add edx, dword [ebp - 0x38]
mov ebx, 0x5ddedf0b
xor dword [ebp - 8], edi
mov edi, dword [edx]
add dword [ebp - 0x2c], 0xb252e5ae
xor edi, ebx
mov dword [esi], edi
xor dword [ebp - 0x24], 0x7dc4b8ab
add esi, 0x37759ddb
sub esi, 0x37759dd7
add edx, 0xf1b3992c
add edx, 0xe4c66d8
loop 0x40645a
add eax, 0x85f9d1fc
sub eax, 0x85f8e6d1
mov ebx, eax
add eax, 5
mov ecx, 0xb615312c
sub ecx, 0xb5d5312c
add ecx, dword [ebp - 0x38]
call ebx
leave
ret

Function at 0x4065b0
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40c17c]
jne 0x4065ba
repz ret
jmp fcn.00406941
Function at 0x406e80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
mov ecx, 0x46a3a0
call fcn.0040f69b
mov ebx, eax
mov dword [ebp - 4], 1
test ebx, ebx
je 0x406f34
test esi, esi
jne 0x406f34
mov eax, dword [ebp + 8]
shr eax, 4
inc eax
push esi
movzx ecx, ax
push ecx
push 6
push ebx
call dword [sym.imp.KERNEL32.DLL_FindResourceExW]
mov edi, eax
test edi, edi
je 0x406f18
push edi
push ebx
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
je 0x406f12
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov esi, eax
test esi, esi
je 0x406f12
push edi
push ebx
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov ecx, dword [ebp + 8]
add eax, esi
and ecx, 0xf
jbe 0x406f01
cmp esi, eax
jae 0x406f05
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x406ef3
cmp esi, eax
jb 0x406f09
xor eax, eax
jmp 0x406f12
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
mov esi, eax
test eax, eax
jne 0x406f3d
mov edi, dword [ebp - 4]
push edi
mov ecx, 0x46a3a0
call fcn.0040f69b
mov ebx, eax
inc edi
mov dword [ebp - 4], edi
test ebx, ebx
jne 0x406ea5
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x407040
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
jne 0x407058
pop edi
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov esi, eax
test esi, esi
je 0x40708a
mov ecx, dword [ebp + 8]
push ebx
push ecx
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
add eax, esi
and edi, 0xf
jbe 0x407086
cmp esi, eax
jae 0x40708a
dec edi
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x407078
cmp esi, eax
jb 0x407090
pop esi
xor eax, eax
pop edi
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebp
ret
Function at 0x4092f0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421c88
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x42a520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x18]
push 0x426648
xor ebx, ebx
push eax
xor esi, esi
mov dword [ebp - 4], ebx
call fcn.00409790
add esp, 8
mov edi, dword [ebp - 0x18]
cmp dword [edi - 0xc], ebx
je 0x4093f6
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
lea ebx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.004094d0
mov ebx, dword [ebp - 0x24]
test eax, eax
jne 0x4093e9
test ebx, ebx
je 0x4093f4
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.__s_
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 3
jmp loc.0047646e
test ebx, ebx
je 0x4093f4
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40943c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a5a0
Capabilities:
Check if file exists
Create process on windows
Delete file
Extract resource via kernel32 functions
Move file
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x422098
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x42a520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x40a789
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a5e3
sub eax, edx
sar eax, 1
je 0x40a789
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40a789
push 0xa
push 0x65
push ebx
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
mov esi, eax
cmp esi, ebx
je 0x40a77b
push esi
push ebx
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov edi, eax
cmp edi, ebx
je 0x40a789
push esi
push ebx
call dword [sym.imp.KERNEL32.DLL_LoadResource]
cmp eax, ebx
je 0x40a789
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
cmp eax, ebx
je 0x40a789
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
lea ecx, [ebp - 0x30]
push ecx
push edi
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.004075a0
add esp, 8
cmp eax, ebx
je 0x40a762
mov edi, dword [ebp - 0x30]
mov esi, dword [ebp - 0x2c]
cmp edi, esi
je 0x40a762
mov edx, dword [ebp + 8]
push 0x42676c
push edx
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], ebx
call fcn.00411584
add esp, 0xc
test eax, eax
jne 0x40a762
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x40a762
push eax
sub esi, edi
push esi
push 1
push edi
call fcn.00411722
mov edx, dword [ebp - 0x1c]
xor ecx, ecx
cmp esi, eax
sete cl
push edx
mov esi, ecx
call fcn.00411809
add esp, 0x14
cmp esi, ebx
je 0x40a762
lea esi, [ebp - 0x20]
call fcn.00406800
push 0x6b
mov byte [ebp - 4], 2
call fcn.00406e80
add esp, 4
cmp eax, ebx
je 0x40a75a
push eax
mov eax, 0x6b
mov edi, esi
call fcn.004069d0
cmp eax, ebx
je 0x40a75a
mov edi, dword [ebp - 0x20]
cmp dword [edi - 0xc], ebx
je 0x40a75a
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
call fcn.00406820
lea esi, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.0040ce30
mov eax, edi
call fcn.0040cd10
cmp eax, ebx
je 0x40a752
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
push ecx
push edx
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
je 0x40a752
mov eax, dword [ebp - 0x14]
push 1
push ebx
push ebx
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 0x18], 1
lea eax, [ebp - 0x14]
call fcn.0040a7a0
lea eax, [ebp - 0x20]
call fcn.0040a7a0
lea esi, [ebp - 0x30]
call fcn.00407620
jmp 0x40a789
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ad40
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421e10
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x42a520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
lea eax, [ebp - 0x18]
push 0x46a040
xor edi, edi
push eax
xor esi, esi
mov dword [ebp - 4], edi
call fcn.00409790
mov ecx, dword [ebp - 0x18]
add esp, 8
cmp dword [ecx - 0xc], edi
je 0x40ae15
cmp edi, 2
jge 0x40ae15
lea edx, [ebp - 0x1c]
push edx
lea edx, [ebp - 0x14]
push edx
push 0
xor eax, eax
push 2
test edi, edi
push 0
setne al
push 0
push 0
push ecx
mov dword [ebp - 0x14], 0
add eax, 0x80000001
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40ae0c
mov esi, dword [ebp - 0x14]
mov ecx, esi
mov dword [ebp - 0x28], ecx
test ebx, ebx
jne 0x40add8
lea eax, [ebx + 0xd]
jmp 0x40adf8
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push 0
push 0x42692c
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [ebp - 0x28]
xor edx, edx
test eax, eax
sete dl
mov esi, edx
test ecx, ecx
je 0x40ae0c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x18]
inc edi
jmp 0x40ad91
lea eax, [ecx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ae55
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret