joyce8/EMBER2024-capa huggingface dataset:
Function at 0x415dd6
Capabilities:
Encrypt data using des

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, ecx
push 0x78
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x10], edi
call fcn.00414050
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
lea esi, [eax + 0x38]
mov dword [ebp - 0xc], esi
add esi, 0x38
xor ecx, ecx
movzx eax, byte [ecx + str.91__]
mov ebx, dword [ebp + 0xc]
dec eax
mov edx, eax
and eax, 7
sar edx, 3
mov dl, byte [edx + ebx]
test byte [eax*4 + 0x41aa8c], dl
mov edx, dword [ebp - 8]
setne al
mov byte [ecx + edx], al
inc ecx
cmp ecx, 0x38
jl 0x415dff
and dword [ebp - 4], 0
push 8
push 0
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
xor ecx, ecx
mov eax, dword [ebp - 4]
xor edx, edx
movzx eax, byte [eax + 0x41aa4c]
add eax, ecx
cmp ecx, 0x1c
setge dl
dec edx
and edx, 0xffffffe4
add edx, 0x38
cmp eax, edx
jl 0x415e60
add eax, 0xffffffe4
mov edx, dword [ebp - 8]
mov al, byte [eax + edx]
mov edx, dword [ebp - 0xc]
mov byte [ecx + edx], al
inc ecx
cmp ecx, 0x38
jl 0x415e3e
and dword [ebp + 0xc], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
movzx eax, byte [eax + 0x41aa5c]
cmp byte [eax + ecx - 1], 0
je 0x415eab
mov eax, dword [ebp + 0xc]
push 6
cdq
pop ecx
idiv ecx
push 6
pop ebx
lea ecx, [eax + esi]
mov eax, dword [ebp + 0xc]
cdq
idiv ebx
mov eax, dword [edx*4 + 0x41aa8c]
sar eax, 2
or byte [ecx], al
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0x30
jl 0x415e76
movzx edx, byte [esi + 4]
xor ecx, ecx
mov eax, dword [ebp - 4]
mov cl, byte [esi + 2]
mov ch, byte [esi]
shl ecx, 8
or ecx, edx
movzx edx, byte [esi + 6]
shl ecx, 8
or ecx, edx
mov edx, dword [edi + 0x88]
shl eax, 3
mov dword [eax + edx], ecx
xor ecx, ecx
mov ch, byte [esi + 1]
mov cl, byte [esi + 3]
movzx edx, byte [esi + 5]
shl ecx, 8
or ecx, edx
movzx edx, byte [esi + 7]
shl ecx, 8
or ecx, edx
mov edx, dword [edi + 0x88]
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x10
mov dword [eax + edx + 4], ecx
jl 0x415e2f
cmp dword [ebp + 8], 1
jne 0x415f5a
push 0x7c
xor esi, esi
pop edx
jmp 0x415f1d
mov edi, dword [ebp - 0x10]
mov eax, dword [edi + 0x88]
mov edi, dword [eax + esi]
mov ebx, dword [edx + eax - 4]
lea ecx, [edx + eax - 4]
add eax, esi
mov dword [eax], ebx
mov eax, dword [ebp - 0x10]
mov dword [ecx], edi
mov eax, dword [eax + 0x88]
mov ebx, dword [edx + eax]
mov edi, dword [esi + eax + 4]
lea ecx, [edx + eax]
lea eax, [esi + eax + 4]
sub edx, 8
add esi, 8
mov dword [eax], ebx
cmp edx, 0x3c
mov dword [ecx], edi
jg 0x415f1a
lea ecx, [ebp - 0x1c]
call fcn.0041396c
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x415f69
Capabilities:
Encode data using xor
Encrypt data using des

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
mov edx, dword [ecx + 0x88]
push ebx
push esi
mov esi, dword [eax]
mov eax, dword [ebp + 0xc]
push edi
push 0x3f
mov eax, dword [eax]
add edx, 8
mov dword [ebp - 4], eax
mov dword [ebp - 8], 8
pop ecx
ror eax, 4
xor eax, dword [edx - 8]
mov edi, eax
mov ebx, eax
shr edi, 0x18
and edi, ecx
shr ebx, 0x10
mov edi, dword [edi*4 + 0x41aca4]
and ebx, ecx
xor edi, dword [ebx*4 + 0x41aea4]
mov ebx, eax
shr ebx, 8
and ebx, ecx
and eax, ecx
xor edi, dword [ebx*4 + 0x41b0a4]
xor edi, dword [eax*4 + 0x41b2a4]
mov eax, dword [edx - 4]
xor eax, dword [ebp - 4]
xor esi, edi
mov edi, eax
mov ebx, eax
shr edi, 0x18
and edi, ecx
shr ebx, 0x10
mov edi, dword [edi*4 + 0x41ada4]
and ebx, ecx
xor edi, dword [ebx*4 + 0x41afa4]
mov ebx, eax
shr ebx, 8
and ebx, ecx
and eax, ecx
xor edi, dword [ebx*4 + 0x41b1a4]
xor edi, dword [eax*4 + 0x41b3a4]
xor esi, edi
mov eax, esi
ror eax, 4
xor eax, dword [edx]
add edx, 0x10
mov edi, eax
mov ebx, eax
shr edi, 0x18
and edi, ecx
shr ebx, 0x10
mov edi, dword [edi*4 + 0x41aca4]
and ebx, ecx
xor edi, dword [ebx*4 + 0x41aea4]
mov ebx, eax
shr ebx, 8
and ebx, ecx
and eax, ecx
xor edi, dword [ebx*4 + 0x41b0a4]
xor edi, dword [eax*4 + 0x41b2a4]
mov eax, dword [edx - 0xc]
xor eax, esi
xor dword [ebp - 4], edi
mov edi, eax
shr edi, 0x18
mov ebx, eax
and edi, ecx
shr ebx, 0x10
mov edi, dword [edi*4 + 0x41ada4]
and ebx, ecx
xor edi, dword [ebx*4 + 0x41afa4]
mov ebx, eax
shr ebx, 8
and ebx, ecx
and eax, ecx
xor edi, dword [ebx*4 + 0x41b1a4]
xor edi, dword [eax*4 + 0x41b3a4]
mov eax, dword [ebp - 4]
xor eax, edi
dec dword [ebp - 8]
mov dword [ebp - 4], eax
jne 0x415f91
mov ecx, dword [ebp + 8]
pop edi
mov dword [ecx], esi
mov ecx, dword [ebp + 0xc]
pop esi
pop ebx
mov dword [ecx], eax
leave
ret 8
Function at 0x4011c8
Capabilities:
Encode data using xor

Disassembly:
push 0x403b98
call sub.MSVBVM60.DLL_ThunRTMain
add byte [eax], al
add byte [eax], al
add byte [eax], al
xor byte [eax], al
add byte [eax], al
inc eax
add byte [eax], al
add byte [eax], al
add byte [eax], al
add al, al
nop
pop eax
dec ebp
ja entry0
dec ebx
mov bl, 0x51
fisubr word [esi - 0xa]
jmp 0x401266
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [edi], ah
sub dword [eax], eax
add bh, bh
sbb al, 0
add byte [eax], al
push es
add byte [esi + 0x72], al
insd dword es:[edi], dx
push ebx
je 0x401283
or eax, 0xc9000801
int1
mov ebx, 0x303031b0
cmp dword [eax], eax
sbb dword [ecx], eax
add byte [edx], al
and eax, esi
sbb al, 0
add byte [esp + esi*2], ch
add byte [esi + 0x1c], bh
add byte [ecx], al
add byte [ecx], al
add byte [eax], dh
xor byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax + 0x1600001c], ch
add byte [eax], al
add byte [eax], ch
add byte [eax], al
add byte [eax], dh
add byte [eax], al
add byte [eax], ah
add byte [eax], al
add dword [eax], eax
sbb byte [eax], al
add byte [eax], al
add byte [eax], al
sbb byte [eax + eax], 0
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
xor dword [edi], esi
xchg ebp, eax
or al, 0xb
and bh, byte [eax]
xchg edi, eax
sub bh, byte [eax]
xchg ebp, eax
sub byte [edx], dh
lea ebp, [ebx]
xor eax, 0x98352394
and bh, byte [eax]
wait
sub dh, byte [ecx]
mov word [edx], fs
cmp dword [edx + 0xa9f3922], ebx
push cs
adc byte [bx], cl
arpl word [ebx], dx
or esp, dword [ebp + 0x13]
or esp, dword [esi + 0x14]
or al, 0x67
adc al, 0xe
bound edx, qword [0x1013640f]
pop ebp
pop ss
pop ss
arpl word [esi], dx
pop ss
arpl word [edi], cx
adc bl, byte [esi + 0x14]
sbb esp, dword [edx + 0x15]
sbb al, 0x6c
sbb byte [eax], ah
jo 0x401344
pop ds
insd dword es:[edi], dx
sbb bl, byte [0x661a176d]
pop ss
pop ss
bound ebp, qword [eax]
sub ebp, dword [ebp + 0x2b]
das
outsd dx, dword [esi]
sub dword [ecx], esi
outsb dx, byte [esi]
sub byte [eax], dh
insd dword es:[edi], dx
sub al, 0x32
jb 0x401372
xor dh, byte [edx + 0x2b]
xor ch, byte [edi + 0x2a]
xor dword [esi + 0x2c], ebp
xor dword [esi + 0x2c], ebp
xor dword [esi + 0x28], ebp
xor byte [ebp + 0x2a], ch
xor dword [esi + 0x29], ebp
xor byte [ebp + 0x2b], ch
xor byte [edx + ebp + 0x30], ch
imul ebp, dword [eax], 0x2e
imul ebp, dword [ecx], 0x302a662f
push 0x23
sub byte [ebp + 0x16], ah
push ss
popal
adc eax, 0x912640c
adc cl, byte fs:[ecx]
popal
adc ecx, dword [edx]
bound edx, qword [ebx]
or esp, dword [esi + 0x13]
or esp, dword [esi + 0xd]
or al, 0x66
adc al, 0xc
adc al, 0xc
adc eax, 0x3127650d
invalid
Function at 0x403291
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
push esi
push edi
mov edi, dword [sym.imp.MSVCRT.dll_malloc]
push 0x11c
call edi
push dword [ebp + 8]
mov esi, eax
call sub.MSVCRT.dll_strlen
add eax, 4
push eax
call edi
push dword [ebp + 8]
mov edi, eax
push edi
call sub.MSVCRT.dll_strcpy
push 0x40c550
push edi
call sub.MSVCRT.dll_strcat
add esp, 0x1c
lea eax, [ebp - 0x140]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_free]
mov dword [esi], eax
call edi
cmp dword [esi], 0xffffffff
pop ecx
jne 0x40333b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jl 0x40330b
cmp eax, 3
jle 0x40332d
cmp eax, 8
je 0x40331f
cmp eax, 0x12
je 0x40332d
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x16
push esi
call edi
pop ecx
xor eax, eax
jmp 0x403383
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
jmp 0x403317
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 2
jmp 0x403317
mov eax, dword [ebp - 0x140]
sub eax, 0x80
neg eax
sbb eax, eax
and eax, dword [ebp - 0x140]
mov word [esi + 0xa], 0xa
mov word [esi + 8], 0xa
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x120]
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x114]
push eax
lea eax, [esi + 0x10]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
mov byte [esi + 0x118], 1
pop ecx
mov eax, esi
pop edi
pop esi
leave
ret
Function at 0x4038b6
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10a4
call fcn.00409190
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [eax + 0x3c]
xor edx, edx
cmp word [ecx + eax + 0x5c], 2
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x10a4]
push dword [ebp + 8]
sete dl
push eax
mov esi, edx
call dword [sym.imp.MSVCRT.dll_vsprintf]
add esp, 0xc
lea eax, [ebp - 0x10a4]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test esi, esi
pop esi
je 0x403931
lea eax, [ebp - 0x104]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x104]
push 0
push eax
lea eax, [ebp - 0x10a4]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
lea eax, [ebp - 0x10a4]
push eax
call dword [sym.imp.MSVCRT.dll_fputs]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
push 0xa
call dword [sym.imp.MSVCRT.dll_fputc]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 0x14
leave
ret
Function at 0x40428e
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
cmp dword [0x40f6c0], 2
push esi
push edi
jne 0x40437f
push str.advapi32.dll
xor edi, edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, edi
je 0x4042c7
push str.GetUserNameW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, edi
mov dword [ebp - 4], 0x208
je 0x40437f
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x21c]
push eax
call esi
test eax, eax
je 0x40437f
cmp word [ebp - 0x21c], di
lea eax, [ebp - 0x21c]
je 0x404374
push ebx
jmp 0x404300
mov eax, dword [ebp - 8]
movzx ebx, word [eax]
inc eax
inc eax
cmp ebx, 0x20
mov dword [ebp - 8], eax
jne 0x404313
push 0x5f
pop ebx
cmp ebx, 0x20
jl 0x404337
cmp ebx, 0x7e
jg 0x404337
push ebx
push str._:___
call dword [sym.imp.MSVCRT.dll_strchr]
pop ecx
test eax, eax
pop ecx
jne 0x404337
and byte [ebp - 0x13], al
push 1
mov byte [ebp - 0x14], bl
pop eax
jmp 0x40434a
push ebx
lea eax, [ebp - 0x14]
push str.__x_
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea esi, [eax + edi]
lea ecx, [esi + 1]
cmp ecx, dword [ebp + 0xc]
jae 0x40436a
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
add edi, eax
push edi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edi, esi
mov eax, dword [ebp - 8]
cmp word [eax], 0
jne 0x4042fd
pop ebx
mov eax, dword [ebp + 8]
and byte [edi + eax], 0
mov eax, edi
jmp 0x4043a0
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x404399
and byte [esi], al
push esi
call sub.MSVCRT.dll_strlen
pop ecx
pop edi
pop esi
leave
ret

Function at 0x40527b
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push ebx
mov ebx, dword [ebp + 8]
push edi
push ebx
call fcn.00403291
mov edi, eax
pop ecx
test edi, edi
je 0x40533e
push esi
push ebx
call sub.MSVCRT.dll_strlen
mov esi, eax
lea eax, [ebp - 0x400]
push esi
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
mov al, byte [ebp + esi - 0x401]
add esp, 0x10
cmp al, 0x2f
je 0x4052cd
cmp al, 0x5c
je 0x4052cd
mov byte [ebp + esi - 0x400], 0x5c
inc esi
push edi
call fcn.00403387
test eax, eax
pop ecx
je 0x405336
cmp byte [eax + 0x10], 0x2e
lea ecx, [eax + 0x10]
jne 0x4052f3
mov dl, byte [eax + 0x11]
test dl, dl
je 0x4052cd
cmp dl, 0x2e
jne 0x4052f3
cmp byte [eax + 0x12], 0
je 0x4052cd
lea eax, [ebp + esi - 0x400]
push ecx
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x400]
push 0x1ff
push eax
call dword [sym.imp.MSVCRT.dll__chmod]
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.MSVCRT.dll__unlink]
add esp, 0x14
test eax, eax
je 0x4052cd
lea eax, [ebp - 0x400]
push eax
call fcn.0040527b
pop ecx
jmp 0x4052cd
push edi
call fcn.00403446
pop ecx
pop esi
push ebx
call dword [sym.imp.MSVCRT.dll__rmdir]
pop ecx
pop edi
pop ebx
leave
ret
Function at 0x407291
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ebp, 0x2000000
push edi
mov eax, dword [esi]
mov ebx, 0xff0000
mov edi, 0xff00
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
cmp eax, ebp
mov eax, dword [esi + 0x18]
jne 0x4072de
mov ecx, dword [eax + 8]
mov edx, ecx
mov ebp, ecx
and edx, ebx
shr ebp, 0x10
or edx, ebp
mov ebp, ecx
shl ebp, 0x10
and ecx, edi
or ebp, ecx
shr edx, 8
shl ebp, 8
or edx, ebp
mov ebp, 0x2000000
jmp 0x4072e1
mov edx, dword [eax + 8]
test dl, 1
je 0x4073a1
mov ecx, dword [esi]
cmp dword [ecx + 4], ebp
mov ecx, dword [eax]
jne 0x40731a
mov edx, ecx
mov ebp, ecx
and edx, ebx
shr ebp, 0x10
or edx, ebp
mov ebp, ecx
shl ebp, 0x10
and ecx, edi
or ebp, ecx
shr edx, 8
shl ebp, 8
or edx, ebp
mov ebp, 0x2000000
mov dword [esp + 0x14], edx
jmp 0x40731e
mov dword [esp + 0x14], ecx
mov ecx, dword [esi]
cmp dword [ecx + 4], ebp
jne 0x40734b
mov ecx, dword [eax + 4]
mov edx, ecx
mov ebp, ecx
and edx, ebx
shr ebp, 0x10
or edx, ebp
mov ebp, ecx
shl ebp, 0x10
and ecx, edi
or ebp, ecx
shr edx, 8
shl ebp, 8
or edx, ebp
mov ebp, 0x2000000
jmp 0x40734e
mov edx, dword [eax + 4]
add eax, 0xc
push edx
push eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x24]
call fcn.00409350
add esp, 0x10
test eax, eax
jne 0x40739a
mov eax, dword [esi]
cmp dword [eax + 4], ebp
mov eax, dword [esi + 0x18]
jne 0x407392
mov eax, dword [eax]
mov ecx, eax
mov edx, eax
and ecx, ebx
shr edx, 0x10
or ecx, edx
mov edx, eax
shl edx, 0x10
and eax, edi
or edx, eax
shr ecx, 8
shl edx, 8
or ecx, edx
jmp 0x407394
mov ecx, dword [eax]
cmp dword [esp + 0x14], ecx
je 0x4073df
xor eax, eax
jmp 0x407457
cmp dword [esp + 0x14], ebp
jne 0x4073cc
mov ecx, dword [eax]
mov edx, ecx
mov ebp, ecx
and edx, ebx
shr ebp, 0x10
or edx, ebp
mov ebp, ecx
shl ebp, 0x10
and ecx, edi
or ebp, ecx
shr edx, 8
shl ebp, 8
or edx, ebp
mov ebp, 0x2000000
jmp 0x4073ce
mov edx, dword [eax]
add eax, 0xc
push edx
push eax
push dword [esp + 0x20]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [esi]
mov esi, dword [esi + 0x18]
mov eax, dword [eax + 4]
cmp eax, ebp
mov dword [esp + 0x14], eax
jne 0x407410
mov eax, dword [esi + 8]
mov ecx, eax
mov edx, eax
and ecx, ebx
shr edx, 0x10
or ecx, edx
mov edx, eax
shl edx, 0x10
and eax, edi
or edx, eax
shr ecx, 8
shl edx, 8
or ecx, edx
jmp 0x407413
mov ecx, dword [esi + 8]
test cl, 2
je 0x407453
cmp dword [esp + 0x14], ebp
mov edx, dword [esp + 0x18]
jne 0x407442
mov ecx, dword [esi]
mov eax, ecx
mov esi, ecx
and eax, ebx
shr esi, 0x10
or eax, esi
mov esi, ecx
shl esi, 0x10
and ecx, edi
or esi, ecx
shr eax, 8
shl esi, 8
or eax, esi
jmp 0x407444
mov eax, dword [esi]
mov ecx, eax
dec eax
test ecx, ecx
je 0x407453
inc eax
xor byte [edx], 0xea
inc edx
dec eax
jne 0x40744c
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40764d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_time]
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_srand]
pop ecx
pop ecx
call dword [sym.imp.MSVCRT.dll_rand]
mov edi, eax
mov eax, dword [ebp + 8]
and edi, 0x7f
add edi, 0x20
and edi, 0xfffffffc
cmp dword [eax + 4], 0x2000000
jne 0x4076ae
mov eax, dword [eax + 8]
mov ebx, eax
mov ecx, eax
and ebx, 0xff0000
shr ecx, 0x10
or ebx, ecx
mov ecx, eax
shl ecx, 0x10
and eax, 0xff00
or ecx, eax
shr ebx, 8
shl ecx, 8
or ebx, ecx
jmp 0x4076b1
mov ebx, dword [eax + 8]
mov ecx, dword [ebp + 0xc]
add ebx, edi
lea eax, [ebx + 0xc]
push eax
mov dword [ecx], eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
je 0x40773c
push 0x10
mov dword [esi + 4], 2
pop eax
mov word [esi + 0xc], di
cmp edi, eax
mov dword [esi + 8], ebx
mov dword [ebp + 0xc], eax
jbe 0x4076f5
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [ebp + 0xc]
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], edi
mov byte [ecx + esi], al
jb 0x4076e1
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ecx + 8], eax
jbe 0x407711
add edi, esi
mov edx, dword [eax + ecx]
xor edx, ebx
mov dword [edi + eax], edx
add eax, 4
cmp eax, dword [ecx + 8]
jb 0x407701
push 4
push 0x40d388
push esi
call sub.MSVCRT.dll_memcpy
push 0xc
lea eax, [esi + ebx]
push esi
push eax
call sub.MSVCRT.dll_memcpy
push 4
push 0x40d380
push esi
call sub.MSVCRT.dll_memcpy
add esp, 0x24
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x407741
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
push 0x18
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
je 0x407806
mov eax, dword [esp + 0xc]
and dword [esi + 0xc], 0
test eax, eax
mov dword [esi + 4], eax
mov dword [esi + 8], 1
je 0x407777
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
pop ecx
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
test eax, eax
jne 0x407787
push esi
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x407805
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x4077a6
push 2
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
je 0x4077eb
push 0x40d394
push 0x40d390
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4077d0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4077d0
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esi], eax
push esi
call fcn.0040780b
test eax, eax
pop ecx
je 0x4077eb
push dword [esi]
call fcn.00406fc6
test eax, eax
pop ecx
je 0x4077eb
mov eax, esi
jmp 0x407808
cmp dword [esi + 0xc], 0
mov edi, dword [sym.imp.MSVCRT.dll_free]
je 0x4077fc
push dword [esi]
call edi
pop ecx
push dword [esi + 4]
call edi
push esi
call edi
pop ecx
pop ecx
xor eax, eax
pop edi
pop esi
ret
Function at 0x40780b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, dword [ebx]
test esi, esi
je 0x4078c4
push 4
push 0x40d380
push esi
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4078c4
mov eax, dword [esi + 4]
mov edx, 0x2000000
cmp eax, edx
jne 0x40786a
mov ecx, dword [esi + 8]
mov eax, ecx
mov edi, ecx
and eax, 0xff0000
shr edi, 0x10
or eax, edi
mov edi, ecx
shl edi, 0x10
and ecx, 0xff00
or edi, ecx
shr eax, 8
shl edi, 8
or eax, edi
jmp 0x40786d
mov eax, dword [esi + 8]
cmp dword [esi + 4], edx
jne 0x407887
mov cx, word [esi + 0xc]
xor edx, edx
movzx edi, cx
mov dh, cl
movzx ecx, dx
shr edi, 8
or edi, ecx
jmp 0x40788b
movzx edi, word [esi + 0xc]
sub eax, edi
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.MSVCRT.dll_malloc]
pop ecx
mov dword [ebx], eax
xor ecx, ecx
cmp eax, ecx
jne 0x4078a4
xor eax, eax
jmp 0x4078c7
cmp dword [ebp + 8], ecx
mov dword [ebx + 0xc], 1
jbe 0x4078c4
lea edx, [edi + esi]
mov edi, dword [edx + ecx]
xor edi, dword [esi + 8]
mov dword [ecx + eax], edi
add ecx, 4
cmp ecx, dword [ebp + 8]
jb 0x4078b3
push 1
pop eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x407c97
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x10], eax
push 1
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00407e45
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x407cd3
xor eax, eax
jmp 0x407e41
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
add eax, dword [edx]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.00407e81
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x407d00
xor eax, eax
jmp 0x407e41
lea ecx, [ebp - 0x18]
push ecx
push 0x40
mov edx, dword [ebp - 8]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x407d28
xor eax, eax
jmp 0x407e41
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0
je 0x407e22
push str.KERNEL32.dll
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x407e14
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x20]
cmp dword [ecx], 0
je 0x407e12
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
and eax, 0x80000000
test eax, eax
jne 0x407dfb
mov dword [ebp - 0x30], str.DisableThreadLibraryCalls
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
mov cl, byte [eax + 2]
mov byte [ebp - 0x2c], cl
movsx edx, byte [ebp - 0x2c]
cmp edx, 0x44
je 0x407dc4
movsx eax, byte [ebp - 0x2c]
cmp eax, 0x46
je 0x407dc4
movsx ecx, byte [ebp - 0x2c]
cmp ecx, 0x47
je 0x407dc4
movsx edx, byte [ebp - 0x2c]
cmp edx, 0x4c
jne 0x407dfb
mov eax, dword [ebp - 0x30]
cmp dword [eax], 0
je 0x407dfb
mov ecx, dword [ebp - 0x28]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x407df0
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 8]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x30]
add ecx, 0xc
mov dword [ebp - 0x30], ecx
jmp 0x407dc4
mov edx, dword [ebp - 0x20]
add edx, 4
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x24]
add eax, 4
mov dword [ebp - 0x24], eax
jmp 0x407d6b
jmp 0x407e22
mov ecx, dword [ebp - 0x1c]
add ecx, 0x14
mov dword [ebp - 0x1c], ecx
jmp 0x407d28
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esp, ebp
pop ebp
ret
Function at 0x407e81
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 0x14]
mov edx, dword [ebp - 0x10]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
jmp 0x407ec7
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 8]
add edx, 0x28
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 6]
cmp dword [ebp - 4], ecx
jge 0x407ef8
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
cmp eax, dword [ebp + 0xc]
ja 0x407ef6
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp - 8]
add edx, dword [eax + 8]
cmp dword [ebp + 0xc], edx
jae 0x407ef6
mov eax, dword [ebp - 8]
jmp 0x407efa
jmp 0x407eb5
xor eax, eax
mov esp, ebp
pop ebp
ret