joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401761
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
xor ecx, ecx
push 8
mov eax, ecx
pop edx
test al, 1
je 0x401775
shr eax, 1
xor eax, 0xedb88320
jmp 0x401777
shr eax, 1
dec edx
jne 0x401768
mov dword [ecx*4 + 0x4110d0], eax
mov dword [ecx*4 + 0x4130d0], eax
inc ecx
cmp ecx, 0x100
jb 0x401763
push ebx
push esi
push edi
mov ecx, 0x4114d0
mov edi, 0x101
mov eax, dword [ecx - 0x400]
push 7
mov edx, ecx
pop esi
movzx ebx, al
shr eax, 8
xor eax, dword [ebx*4 + 0x4110d0]
mov dword [edx], eax
add edx, 0x400
dec esi
jne 0x4017a9
add ecx, 4
dec edi
jne 0x40179e
pop edi
pop esi
pop ebx
ret

Function at 0x4017cb
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x4130d4], 0
jne 0x4017d9
call fcn.00401761
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
test esi, esi
jbe 0x401806
test cl, 7
je 0x401806
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4110d0]
dec esi
inc ecx
jmp 0x4017e7
cmp esi, 8
jb 0x401899
mov edi, esi
shr edi, 3
push ebx
xor eax, dword [ecx]
sub esi, 8
mov ebx, eax
shr ebx, 0x10
movzx ebx, bl
mov edx, eax
shr edx, 0x18
mov edx, dword [edx*4 + 0x4120d0]
xor edx, dword [ebx*4 + 0x4124d0]
mov ebx, eax
shr ebx, 8
movzx ebx, bl
xor edx, dword [ebx*4 + 0x4128d0]
movzx ebx, byte [ecx + 6]
xor edx, dword [ebx*4 + 0x4114d0]
movzx ebx, byte [ecx + 5]
xor edx, dword [ebx*4 + 0x4118d0]
movzx ebx, byte [ecx + 4]
xor edx, dword [ebx*4 + 0x411cd0]
movzx ebx, byte [ecx + 7]
xor edx, dword [ebx*4 + 0x4110d0]
movzx eax, al
xor edx, dword [eax*4 + 0x412cd0]
add ecx, 8
dec edi
mov eax, edx
jne 0x401815
pop ebx
jmp 0x401899
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x4110d0]
dec esi
inc ecx
test esi, esi
ja 0x401885
pop edi
pop esi
ret 0xc

Function at 0x40194b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.004012c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x4019dd
push esi
push edi
mov edi, 0x400
push edi
lea eax, [ebp - 0x800]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00406cab
lea eax, [ebp - 0x800]
push eax
call fcn.00409129
mov esi, eax
lea eax, [ebp - 0x800]
push eax
call fcn.004070e2
test al, al
jne 0x4019b9
lea eax, [ebp - 0x1000]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x1000]
push eax
call fcn.00409129
lea esi, [esi + eax + 1]
mov eax, 0x104
pop edi
cmp esi, eax
pop esi
jbe 0x4019dd
push eax
push 0xaf
call fcn.00408c71
push eax
push 0x40f2c0
call fcn.0040a123
add esp, 0xc
leave
ret 8
Function at 0x40380e
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esi + 0xc20], ebx
cmp byte [esi + 0x1c], bl
jne 0x40382e
test byte [ebp + 0x10], 4
jne 0x40382e
xor al, al
jmp 0x403830
mov al, 1
mov ecx, dword [ebp + 0x10]
shr ecx, 1
and cl, 1
movzx edi, cl
neg edi
sbb edi, edi
and edi, 0xc0000000
add edi, 0x80000000
test byte [ebp + 0x10], 1
je 0x403857
or edi, 0x40000000
mov dword [ebp + 0x10], 1
cmp al, bl
je 0x403869
mov dword [ebp + 0x10], 3
xor eax, eax
cmp byte [esi + 0x15], bl
setne al
dec eax
and eax, 0x8000000
mov dword [ebp - 4], eax
call fcn.00406603
test eax, eax
je 0x4038a3
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x4038a3
cmp word [eax], bx
je 0x4038a3
push ebx
push dword [ebp - 4]
push 3
push ebx
push dword [ebp + 0x10]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4038b7
push ebx
push dword [ebp - 4]
push 3
push ebx
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4038d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4038d3
mov dword [esi + 0xc20], 1
cmp edi, 0xffffffff
setne byte [ebp + 0x13]
mov byte [esi + 0x12], bl
mov dword [esi + 0xc], ebx
mov byte [esi + 0x10], bl
cmp byte [ebp + 0x13], bl
je 0x40394b
mov dword [esi + 4], edi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x40390c
push edi
call fcn.00409129
lea eax, [eax + eax + 2]
push eax
push edi
lea eax, [esi + 0x41e]
push eax
call fcn.00408eaa
jmp 0x403915
xor eax, eax
mov word [esi + 0x41e], ax
cmp dword [ebp + 8], ebx
je 0x403932
push dword [ebp + 8]
call fcn.00408ef5
inc eax
push eax
push dword [ebp + 8]
lea eax, [esi + 0x1d]
push eax
call fcn.00408eaa
jmp 0x403941
push 0x1000000
lea eax, [esi + 0x1d]
push eax
push edi
call fcn.0040d131
push dword [esi + 4]
mov ecx, esi
call fcn.0040364d
mov al, byte [ebp + 0x13]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x403a3b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0xc], 1
mov esi, 0x4e20
jne 0x403a61
cmp dword [ebp + 0xc], esi
jbe 0x403a56
mov dword [ebp + 0xc], esi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [edi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403ab1
mov ecx, edi
call fcn.004037c8
test al, al
je 0x403a97
cmp dword [ebp + 0xc], esi
jbe 0x403a97
push esi
push dword [ebp + 8]
mov ecx, edi
call fcn.00403a3b
jmp 0x403ab4
cmp dword [edi + 0xc], 1
jne 0x403aac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x403aac
xor eax, eax
jmp 0x403ab4
or eax, 0xffffffff
jmp 0x403ab4
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 8
Function at 0x403cde
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0
push esi
mov esi, ecx
je 0x403dee
mov eax, dword [esi + 0xc]
test eax, eax
je 0x403d0b
dec eax
je 0x403d00
dec eax
jne 0x403d0b
push 0xfffffffffffffff4
jmp 0x403d02
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [esi + 0xc], edi
je 0x403d5a
cmp dword [ebp + 0xc], edi
jbe 0x403d75
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov eax, 0x4000
cmp ecx, eax
jae 0x403d32
mov eax, ecx
push 0
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
push dword [esi + 4]
call ebx
dec eax
neg eax
sbb al, al
inc al
je 0x403d75
add edi, 0x4000
cmp edi, dword [ebp + 0xc]
jb 0x403d22
jmp 0x403d71
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call ebx
dec eax
neg eax
sbb al, al
inc al
test al, al
jne 0x403de8
cmp byte [esi + 0x14], 0
je 0x403de8
cmp dword [esi + 0xc], 0
jne 0x403de8
push 0
lea eax, [esi + 0x41e]
push eax
lea eax, [esi + 0x1d]
mov edi, 0x42ddbc
push eax
mov ecx, edi
call fcn.00401ac1
test al, al
je 0x403dd2
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x403d13
test eax, eax
jbe 0x403d13
push 0
mov ecx, esi
call fcn.00403729
mov ecx, dword [ebp - 4]
xor edi, edi
sub eax, ecx
sbb edx, edi
push edx
push eax
mov ecx, esi
call fcn.00403c6d
jmp 0x403d13
lea eax, [esi + 0x41e]
push eax
lea eax, [esi + 0x1d]
push eax
push 0
push 0
mov ecx, edi
call fcn.00401d67
pop edi
mov byte [esi + 8], 1
pop ebx
pop esi
leave
ret 8

Function at 0x403ec6
Capabilities:
Check if file exists
Get file attributes

Disassembly:
call fcn.00406603
test eax, eax
je 0x403ef0
mov eax, dword [esp + 8]
test eax, eax
je 0x403ef0
cmp word [eax], 0
je 0x403ef0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov al, cl
jmp 0x403f0d
cmp dword [esp + 4], 0
je 0x403f0b
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x403f0b
xor eax, eax
inc eax
jmp 0x403f0d
xor eax, eax
ret 8

Function at 0x403f6c
Capabilities:
Get file attributes

Disassembly:
call fcn.00406603
test eax, eax
je 0x403f8c
mov eax, dword [esp + 8]
test eax, eax
je 0x403f8c
cmp word [eax], 0
je 0x403f8c
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x403f96
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
ret 8

Function at 0x403f99
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
call fcn.00406603
test eax, eax
je 0x403fbe
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403fbe
cmp word [eax], 0
je 0x403fbe
push dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x403fd0
cmp dword [ebp + 8], 0
je 0x403fd7
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
setne al
jmp 0x403fd9
xor al, al
pop ebp
ret 0xc
Function at 0x40413e
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
call fcn.00406603
mov esi, dword [ebp + 0xc]
xor ebx, ebx
test eax, eax
je 0x404164
cmp esi, ebx
je 0x404164
cmp word [esi], bx
je 0x404164
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x404173
cmp dword [ebp + 8], ebx
je 0x4041a1
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp eax, ebx
je 0x40418c
cmp byte [ebp + 0x10], bl
je 0x404188
push dword [ebp + 0x14]
push esi
push dword [ebp + 8]
call fcn.00403f99
xor eax, eax
jmp 0x4041a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4041a1
cmp eax, 3
je 0x4041a1
xor eax, eax
inc eax
jmp 0x4041a4
push 2
pop eax
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x408dbd
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0xc]
imul eax, dword [ebp + 0x10]
push eax
push dword [ebp + 8]
mov eax, dword [ebp + 0x14]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x408df5
mov eax, dword [ebp - 4]
xor edx, edx
div dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x408df9
and dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
leave
ret 0x10

Function at 0x40953b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor esi, esi
cmp dword [0x42754c], esi
jne 0x409554
mov ecx, 0x427544
call fcn.004094fc
cmp byte [ebp + 0x14], 0
mov ebx, dword [ebp + 0x10]
je 0x4095aa
cmp dword [0x42754c], esi
je 0x4095db
test bl, 0xf
jne 0x4095db
add ebx, ebx
push ebx
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00408e73
push esi
push ebx
push dword [ebp + 0xc]
call dword [0x42754c]
test eax, eax
jne 0x409603
push str.CryptProtectMemory_failed
mov esi, 0x42ddbc
mov ecx, esi
call fcn.00401ba4
mov ecx, esi
call fcn.00401a46
push 2
mov ecx, esi
call fcn.00401d41
jmp 0x409603
cmp dword [0x427550], esi
je 0x4095db
test bl, 0xf
jne 0x4095db
add ebx, ebx
push ebx
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00408e73
push esi
push ebx
push dword [ebp + 0xc]
call dword [0x427550]
test eax, eax
jne 0x409603
push str.CryptUnprotectMemory_failed
jmp 0x40958c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
cmp ebx, esi
jbe 0x409603
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
sub esi, ecx
push edi
lea edi, [eax + edx + 0x4b]
xor di, word [esi + ecx]
inc edx
mov word [ecx], di
inc ecx
inc ecx
cmp edx, ebx
jb 0x4095f0
pop edi
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x4096f2
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
cmp dword [0x411028], 0
push ebx
push esi
push edi
mov edi, 0x400
jne 0x40973d
push 0x64
lea eax, [ebp - 0x12c]
push eax
push 0xf
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ax, word [ebp - 0x12c]
mov word [0x433f04], ax
xor eax, eax
mov word [0x433f06], ax
mov dword [0x411028], 0x433f04
lea eax, [ebp - 0x64]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040c682
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
push ebx
push esi
xor eax, eax
push 0x411018
mov word [esi], ax
lea eax, [ebp - 0x64]
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
xor eax, eax
pop edi
mov word [esi + ebx*2 - 2], ax
pop esi
pop ebx
leave
ret 0x10
Function at 0x409abc
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
push 0x68
push dword [0x42dd90]
call dword [sym.imp.USER32.dll_GetDlgItem]
cmp byte [0x42dd94], 0
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov edi, eax
mov dword [ebp - 4], edi
mov ebx, 0xb1
jne 0x409b1e
mov ecx, dword [0x42755c]
call fcn.0040d96b
push 5
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
push 0xffffffffffffffff
push 0
push ebx
push edi
call esi
push 0x40f308
push 0
push 0xc2
push edi
call esi
mov byte [0x42dd94], 1
mov edi, 0x5f5e100
push edi
push edi
push ebx
push dword [ebp - 4]
call esi
lea eax, [ebp - 0x60]
push eax
push 0
push 0x43a
push dword [ebp - 4]
mov dword [ebp - 0x60], 0x5c
call esi
xor eax, eax
inc eax
cmp byte [ebp + 8], 0
mov byte [ebp - 0x47], 0
mov dword [ebp - 0x5c], eax
je 0x409b6e
mov ecx, dword [ebp - 0x58]
and ecx, 0xbfffffff
or ecx, eax
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x4c], 0xa0
mov dword [ebp - 0x5c], 0x40000001
lea ecx, [ebp - 0x60]
push ecx
push eax
push 0x444
push dword [ebp - 4]
call esi
push dword [ebp + 0xc]
push 0
push 0xc2
push dword [ebp - 4]
call esi
push edi
push edi
push ebx
push dword [ebp - 4]
call esi
cmp byte [ebp + 8], 0
je 0x409bb8
mov eax, dword [ebp - 0x58]
and eax, 0xfffffffe
or eax, 0x40000000
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x60]
push eax
push 1
push 0x444
push dword [ebp - 4]
call esi
push 0x40f5d4
push 0
push 0xc2
push dword [ebp - 4]
call esi
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x40a436
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2000
call fcn.004012c0
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 8]
test ebx, ebx
je 0x40a451
mov byte [ebx], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40a45b
mov byte [eax], 0
test edi, edi
je 0x40a504
movzx eax, word [edi]
test ax, ax
je 0x40a504
push esi
xor esi, esi
xor ecx, ecx
movzx eax, ax
inc edi
inc edi
cmp ax, 0x3d
jne 0x40a494
cmp dword [ebp + 0xc], 0
je 0x40a4a0
test esi, esi
jne 0x40a4a0
test ebx, ebx
je 0x40a490
mov byte [ebx], 1
mov esi, edx
jmp 0x40a4af
cmp ax, 0xd
je 0x40a4c2
cmp ax, 0xa
je 0x40a4c4
mov word [edx], ax
mov eax, dword [ebp + 0x14]
inc edx
add eax, 0xfffffffe
inc edx
cmp ecx, eax
jg 0x40a4ba
movzx eax, word [edi]
inc ecx
test ax, ax
jne 0x40a474
jmp 0x40a4c4
mov eax, dword [ebp + 0x10]
mov byte [eax], 1
jmp 0x40a4c4
inc edi
inc edi
mov ebx, dword [ebp + 0xc]
xor eax, eax
mov word [edx], ax
test ebx, ebx
je 0x40a4ff
mov word [ebx], ax
test esi, esi
je 0x40a4ff
push 0x1000
lea eax, [ebp - 0x2000]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp + 0x14]
lea eax, [ebp - 0x2000]
push eax
push ebx
call fcn.0040c658
xor eax, eax
mov word [esi], ax
mov eax, edi
pop esi
jmp 0x40a506
xor eax, eax
pop edi
pop ebx
leave
ret 0x10
Function at 0x40a54b
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
push 0x400
lea eax, [ebp - 0x820]
push eax
call fcn.0040e58e
cmp byte [0x42dd95], 0
jne 0x40a5d9
push 6
push dword [0x411014]
lea eax, [ebp - 0x820]
push eax
call fcn.00406d97
push eax
call fcn.0040d3d6
test eax, eax
jne 0x40a5d9
push 0x40f654
call fcn.0040e57b
lea eax, [ebp - 0x820]
push eax
call fcn.00409129
xor ecx, ecx
push 0x1e
mov word [ebp + eax*2 - 0x81e], cx
push ecx
lea eax, [ebp - 0x20]
push eax
call fcn.00408e46
push 0x14
pop eax
mov word [ebp - 0x10], ax
lea eax, [ebp - 0x820]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x1c], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
leave
ret

Function at 0x40a6a4
Capabilities:
Delete file

Disassembly:
push ebx
xor ebx, ebx
mov byte [0x42dd81], 1
cmp dword [0x42dd90], ebx
je 0x40a6cc
push 0x7d
call fcn.00408c71
push eax
push 2
push dword [0x42dd90]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
mov eax, dword [0x42dd90]
mov dword [0x42dd84], ebx
mov byte [0x42dd80], 1
cmp eax, ebx
je 0x40a72d
push 1
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [0x42dda4], ebx
jne 0x40a6fb
cmp byte [0x42dd94], bl
je 0x40a703
cmp dword [0x42dd88], ebx
jne 0x40a725
push ebx
push 1
push 0x111
push dword [0x42dd90]
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40a725
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.004096b3
cmp dword [0x42dd90], ebx
jne 0x40a719
cmp byte [0x42ddc8], bl
pop ebx
je 0x40a73b
jmp fcn.0040a54b
ret

Function at 0x40a777
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
push ebx
xor ebx, ebx
cmp byte [0x42ddd0], bl
je 0x40a7f7
cmp word [0x427560], bx
je 0x40a7f7
push esi
push 0x427560
lea esi, [ebp - 0x808]
call fcn.0040a73c
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
push str.SoftwareWinRAR_SFX
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
pop esi
test eax, eax
jne 0x40a7f7
push dword [ebp + 8]
call fcn.00409129
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x808]
push 1
push ebx
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
leave
ret 4
Function at 0x40a7fc
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.004012c0
cmp byte [0x42ddd0], 0
je 0x40a8a3
push esi
push dword [ebp + 8]
lea esi, [ebp - 0x100c]
call fcn.0040a73c
lea eax, [ebp - 8]
push eax
push 1
push 0
push str.SoftwareWinRAR_SFX
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
pop esi
test eax, eax
jne 0x40a8a3
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x80c]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x100c]
push eax
push dword [ebp - 8]
mov dword [ebp - 4], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a89a
shr dword [ebp - 4], 1
mov eax, 0x3ff
cmp dword [ebp - 4], eax
jae 0x40a87e
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
xor ecx, ecx
mov word [ebp + eax*2 - 0x80c], cx
lea eax, [ebp - 0x80c]
push eax
push dword [ebp + 8]
call fcn.0040c658
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret 8

Function at 0x40a9cb
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [sym.imp.USER32.dll_DialogBoxParamW]
cmp byte [0x42dd7e], 0
mov eax, dword [ebp + 0xc]
mov dword [0x42dd70], eax
mov eax, dword [ebp + 0x10]
mov dword [0x42dd74], eax
mov eax, dword [ebp + 0x14]
mov dword [0x42dd68], eax
je 0x40a9fb
xor eax, eax
inc eax
jmp 0x40aa24
cmp byte [0x42dd7f], 0
je 0x40aa09
push 2
pop eax
jmp 0x40aa24
push dword [ebp + 8]
push 0x409c8c
push dword [0x42dd90]
push str.REPLACEFILEDLG
push dword [0x42dd6c]
call esi
dec eax
je 0x40aa76
dec eax
je 0x40aa88
dec eax
je 0x40aa6f
dec eax
jne 0x40aa53
push dword [ebp + 8]
push 0x409fd8
push dword [0x42dd90]
push str.RENAMEDLG
push dword [0x42dd6c]
call esi
test eax, eax
je 0x40a9d5
mov al, 0x52
jmp 0x40aa83
dec eax
je 0x40aa64
dec eax
mov al, 0x4e
jne 0x40aa83
mov byte [0x42dd7f], 1
jmp 0x40aa83
mov byte [0x42dd82], 1
mov al, 0x43
jmp 0x40aa83
mov byte [0x42dd7e], 1
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov al, 0x59
pop esi
pop ebp
ret 0x10
mov al, 0x4e
jmp 0x40aa83
Function at 0x40cda4
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [0x4254ac]
mov ecx, eax
xor ecx, dword [esp + 4]
shr eax, 8
mov edx, 0xff
and ecx, edx
xor eax, dword [ecx*4 + 0x4130d0]
mov ecx, dword [0x4254b4]
mov dword [0x4254ac], eax
movzx eax, al
add eax, dword [0x4254b0]
imul eax, eax, 0x8088405
inc eax
mov dword [0x4254b0], eax
shr eax, 0x18
xor eax, ecx
and eax, edx
shr ecx, 8
xor ecx, dword [eax*4 + 0x4130d0]
mov eax, dword [esp + 4]
mov dword [0x4254b4], ecx
ret 4

Function at 0x40ce37
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push dword [ebp + 0xc]
call fcn.0040cdfe
push 0xc
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.00408e73
xor esi, esi
lea edx, [ebp + esi - 0xc]
call fcn.0040cd84
xor byte [edx], al
movzx eax, byte [edx]
push eax
call fcn.0040cda4
inc esi
cmp esi, 0xc
jl 0x40ce56
movzx ax, byte [ebp - 1]
movzx ecx, ax
mov eax, dword [0x414b48]
test byte [eax + 0x40], 2
movzx eax, byte [0x424bc7]
jne 0x40ce91
movzx eax, byte [0x424bcf]
movzx ecx, cx
cmp ecx, eax
je 0x40ce9d
or eax, 0xffffffff
jmp 0x40cee2
mov ecx, dword [0x424b60]
mov eax, ecx
cdq
cmp edx, dword [0x413924]
push edi
jl 0x40cebf
mov edx, dword [0x413920]
jg 0x40cebb
cmp eax, edx
jbe 0x40cebf
mov edi, edx
jmp 0x40cec1
mov edi, ecx
mov esi, dword [0x424b58]
jmp 0x40cedb
dec edi
call fcn.0040cd84
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.0040cda4
inc esi
test edi, edi
jne 0x40cec9
xor eax, eax
pop edi
pop esi
leave
ret 8
Function at 0x40d982
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
push edi
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call ebx
mov esi, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi]
lea ecx, [ebp - 4]
push ecx
push esi
call dword [eax + 0x48]
test eax, eax
jl 0x40d9b4
cmp dword [ebp - 4], edi
jne 0x40d9f5
call ebx
sub eax, dword [ebp - 0xc]
cmp eax, 0x2710
ja 0x40d9f5
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40d9a1
push edi
push edi
push edi
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x40d9a1
mov eax, dword [esi]
lea ecx, [ebp - 4]
push ecx
push esi
call dword [eax + 0x48]
mov esi, eax
cmp esi, edi
jl 0x40da4b
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
lea edx, [ebp - 8]
push edx
push 0x40fcb0
push eax
call dword [ecx]
mov esi, eax
cmp esi, edi
jl 0x40da42
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov esi, eax
cmp esi, edi
jl 0x40da39
mov eax, dword [ebp - 8]
push dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov esi, eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor eax, eax
cmp esi, edi
pop edi
pop esi
setge al
pop ebx
leave
ret 8