joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403712
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 + 0xc18], ebx
cmp byte [esi + 0x16], bl
je 0x40372c
mov byte [ebp + 0x10], 1
mov dword [ebp - 4], 0x80000000
cmp byte [ebp + 0x14], bl
je 0x40373f
mov dword [ebp - 4], 0xc0000000
mov dword [ebp + 0x14], 1
cmp byte [ebp + 0x10], bl
je 0x403752
mov dword [ebp + 0x14], 3
xor eax, eax
cmp byte [esi + 0x15], bl
setne al
dec eax
and eax, 0x8000000
mov edi, eax
call fcn.00406fae
test eax, eax
je 0x40378b
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40378b
cmp word [eax], bx
je 0x40378b
push ebx
push edi
push 3
push ebx
push dword [ebp + 0x14]
push dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x40379f
push ebx
push edi
push 3
push ebx
push dword [ebp + 0x14]
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4037bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4037bb
mov dword [esi + 0xc18], 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 0x403833
mov dword [esi + 4], edi
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x4037f4
push edi
call fcn.00409bda
lea eax, [eax + eax + 2]
push eax
push edi
lea eax, [esi + 0x418]
push eax
call fcn.0040995b
jmp 0x4037fd
xor eax, eax
mov word [esi + 0x418], ax
cmp dword [ebp + 8], ebx
je 0x40381a
push dword [ebp + 8]
call fcn.004099a6
inc eax
push eax
push dword [ebp + 8]
lea eax, [esi + 0x17]
push eax
call fcn.0040995b
jmp 0x403829
push 0x1000000
lea eax, [esi + 0x17]
push eax
push edi
call fcn.0040d901
push dword [esi + 4]
mov ecx, esi
call fcn.00403561
mov al, byte [ebp + 0x13]
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x4038fe
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 0x403924
cmp dword [ebp + 0xc], esi
jbe 0x403919
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 0x403974
mov ecx, edi
call fcn.004036cc
test al, al
je 0x40395a
cmp dword [ebp + 0xc], esi
jbe 0x40395a
push esi
push dword [ebp + 8]
mov ecx, edi
call fcn.004038fe
jmp 0x403977
cmp dword [edi + 0xc], 1
jne 0x40396f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x40396f
xor eax, eax
jmp 0x403977
or eax, 0xffffffff
jmp 0x403977
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 8
Function at 0x403bb0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
call fcn.00406fae
test eax, eax
je 0x403bda
mov eax, dword [esp + 8]
test eax, eax
je 0x403bda
cmp word [eax], 0
je 0x403bda
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov al, cl
jmp 0x403bf7
cmp dword [esp + 4], 0
je 0x403bf5
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x403bf5
xor eax, eax
inc eax
jmp 0x403bf7
xor eax, eax
ret 8

Function at 0x403c56
Capabilities:
Get file attributes

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

Function at 0x403c83
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
call fcn.00406fae
test eax, eax
je 0x403ca8
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403ca8
cmp word [eax], 0
je 0x403ca8
push dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x403cba
cmp dword [ebp + 8], 0
je 0x403cc1
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
setne al
jmp 0x403cc3
xor al, al
pop ebp
ret 0xc

Function at 0x403e31
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
call fcn.00406fae
mov esi, dword [ebp + 0xc]
xor ebx, ebx
test eax, eax
je 0x403e57
cmp esi, ebx
je 0x403e57
cmp word [esi], bx
je 0x403e57
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x403e66
cmp dword [ebp + 8], ebx
je 0x403e94
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp eax, ebx
je 0x403e7f
cmp byte [ebp + 0x10], bl
je 0x403e7b
push dword [ebp + 0x14]
push esi
push dword [ebp + 8]
call fcn.00403c83
xor eax, eax
jmp 0x403e97
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x403e94
cmp eax, 3
je 0x403e94
xor eax, eax
inc eax
jmp 0x403e97
push 2
pop eax
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x40533f
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 0x405371
cmp dword [ebp - 4], edi
jne 0x4053b2
call ebx
sub eax, dword [ebp - 0xc]
cmp eax, 0x2710
ja 0x4053b2
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 0x40535e
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 0x40535e
mov eax, dword [esi]
lea ecx, [ebp - 4]
push ecx
push esi
call dword [eax + 0x48]
mov esi, eax
cmp esi, edi
jl 0x405408
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
lea edx, [ebp - 8]
push edx
push 0x40fc30
push eax
call dword [ecx]
mov esi, eax
cmp esi, edi
jl 0x4053ff
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov esi, eax
cmp esi, edi
jl 0x4053f6
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
Function at 0x405bac
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
mov al, byte [ebp + 0x18]
sub esp, 0x10
push ebx
push esi
push edi
push 0
push dword [ebp + 0xc]
mov esi, ecx
mov byte [esi + 0x21], al
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebp + 8]
mov ecx, esi
call fcn.00405b45
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x14], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [sym.imp.USER32.dll_GetParent]
push 2
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0xc]
call ebx
push eax
push 0
call dword [sym.imp.USER32.dll_MapWindowPoints]
mov eax, dword [esi + 4]
test eax, eax
je 0x405c13
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 8]
push esi
push dword [esi]
sub edi, eax
push 0
push dword [ebp + 0xc]
lea ecx, [eax + 1]
dec edi
mov dword [ebp + 0x18], ecx
dec edi
call ebx
push eax
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0xc]
push eax
push edi
push dword [ebp - 0xc]
xor edi, edi
push dword [ebp + 0x18]
push 0x40000000
push edi
push str.RarHtmlClassName
push edi
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [esi + 4], eax
cmp dword [esi + 0xc], edi
jne 0x405c94
cmp dword [ebp + 0xc], edi
je 0x405cb7
cmp dword [esi + 0x14], edi
jne 0x405cb7
mov eax, dword [esi + 0x10]
cmp eax, edi
je 0x405cb7
push eax
mov ecx, esi
call fcn.00405825
mov esi, eax
cmp esi, edi
je 0x405cb7
push 5
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_SetWindowTextW]
push esi
call fcn.004096fe
jmp 0x405cb7
cmp eax, edi
je 0x405caa
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [esi + 4]
call dword [sym.imp.USER32.dll_UpdateWindow]
cmp dword [esi + 0x1c], 0x64
jbe 0x405cb7
mov ecx, esi
call fcn.0040553a
pop edi
pop esi
pop ebx
leave
ret 0x14
Function at 0x409830
Capabilities:
Write 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_WriteFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x409868
mov eax, dword [ebp - 4]
xor edx, edx
div dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x40986c
and dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
leave
ret 0x10

Function at 0x409873
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 0x4098ab
mov eax, dword [ebp - 4]
xor edx, edx
div dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x4098af
and dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
leave
ret 0x10

Function at 0x409fd4
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 0x40a01f
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 [0x431ef0], ax
xor eax, eax
mov word [0x431ef2], ax
mov dword [0x411028], 0x431ef0
lea eax, [ebp - 0x64]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040cee7
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 0x40a39e
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
push 0x68
push dword [0x42be80]
call dword [sym.imp.USER32.dll_GetDlgItem]
cmp byte [0x42cf94], 0
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov edi, eax
mov dword [ebp - 4], edi
mov ebx, 0xb1
jne 0x40a400
mov ecx, dword [0x42554c]
call fcn.00405328
push 5
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
push 0xffffffffffffffff
push 0
push ebx
push edi
call esi
push 0x40f2f8
push 0
push 0xc2
push edi
call esi
mov byte [0x42cf94], 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 0x40a450
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 0x40a49a
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 0x40f7f8
push 0
push 0xc2
push dword [ebp - 4]
call esi
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x40acf0
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 0x40ad0b
mov byte [ebx], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40ad15
mov byte [eax], 0
test edi, edi
je 0x40adbe
movzx eax, word [edi]
test ax, ax
je 0x40adbe
push esi
xor esi, esi
xor ecx, ecx
movzx eax, ax
inc edi
inc edi
cmp ax, 0x3d
jne 0x40ad4e
cmp dword [ebp + 0xc], 0
je 0x40ad5a
test esi, esi
jne 0x40ad5a
test ebx, ebx
je 0x40ad4a
mov byte [ebx], 1
mov esi, edx
jmp 0x40ad69
cmp ax, 0xd
je 0x40ad7c
cmp ax, 0xa
je 0x40ad7e
mov word [edx], ax
mov eax, dword [ebp + 0x14]
inc edx
add eax, 0xfffffffe
inc edx
cmp ecx, eax
jg 0x40ad74
movzx eax, word [edi]
inc ecx
test ax, ax
jne 0x40ad2e
jmp 0x40ad7e
mov eax, dword [ebp + 0x10]
mov byte [eax], 1
jmp 0x40ad7e
inc edi
inc edi
mov ebx, dword [ebp + 0xc]
xor eax, eax
mov word [edx], ax
test ebx, ebx
je 0x40adb9
mov word [ebx], ax
test esi, esi
je 0x40adb9
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.0040cebd
xor eax, eax
mov word [esi], ax
mov eax, edi
pop esi
jmp 0x40adc0
xor eax, eax
pop edi
pop ebx
leave
ret 0x10
Function at 0x40ae05
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
push 0x400
lea eax, [ebp - 0x820]
push eax
call fcn.0040dfe6
cmp byte [0x42cf95], 0
jne 0x40ae93
push 6
push dword [0x411014]
lea eax, [ebp - 0x820]
push eax
call fcn.0040772c
push eax
call fcn.0040db83
test eax, eax
jne 0x40ae93
push 0x40f878
call fcn.0040dfd3
lea eax, [ebp - 0x820]
push eax
call fcn.00409bda
xor ecx, ecx
push 0x1e
mov word [ebp + eax*2 - 0x81e], cx
push ecx
lea eax, [ebp - 0x20]
push eax
call fcn.004098fc
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 0x40af5e
Capabilities:
Delete file

Disassembly:
push ebx
xor ebx, ebx
mov byte [0x42be71], 1
cmp dword [0x42be80], ebx
je 0x40af86
push 0x7d
call fcn.00409669
push eax
push 2
push dword [0x42be80]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
mov eax, dword [0x42be80]
mov dword [0x42be74], ebx
mov byte [0x42be70], 1
cmp eax, ebx
je 0x40afe7
push 1
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [0x42cfa4], ebx
jne 0x40afb5
cmp byte [0x42cf94], bl
je 0x40afbd
cmp dword [0x42be78], ebx
jne 0x40afdf
push ebx
push 1
push 0x111
push dword [0x42be80]
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40afdf
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00409f95
cmp dword [0x42be80], ebx
jne 0x40afd3
cmp byte [0x42be88], bl
pop ebx
je 0x40aff5
jmp fcn.0040ae05
ret

Function at 0x40b031
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
push ebx
xor ebx, ebx
cmp byte [0x42be90], bl
je 0x40b0b1
cmp word [0x425550], bx
je 0x40b0b1
push esi
push 0x425550
lea esi, [ebp - 0x808]
call fcn.0040aff6
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 0x40b0b1
push dword [ebp + 8]
call fcn.00409bda
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 0x40b0b6
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.004012c0
cmp byte [0x42be90], 0
je 0x40b15d
push esi
push dword [ebp + 8]
lea esi, [ebp - 0x100c]
call fcn.0040aff6
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 0x40b15d
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 0x40b154
shr dword [ebp - 4], 1
mov eax, 0x3ff
cmp dword [ebp - 4], eax
jae 0x40b138
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.0040cebd
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret 8

Function at 0x40b285
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [sym.imp.USER32.dll_DialogBoxParamW]
cmp byte [0x42be6e], 0
mov eax, dword [ebp + 0xc]
mov dword [0x42bd60], eax
mov eax, dword [ebp + 0x10]
mov dword [0x42bd64], eax
mov eax, dword [ebp + 0x14]
mov dword [0x42bd58], eax
je 0x40b2b5
xor eax, eax
inc eax
jmp 0x40b2de
cmp byte [0x42be6f], 0
je 0x40b2c3
push 2
pop eax
jmp 0x40b2de
push dword [ebp + 8]
push 0x40a56e
push dword [0x42be80]
push str.REPLACEFILEDLG
push dword [0x42bd5c]
call esi
dec eax
je 0x40b330
dec eax
je 0x40b342
dec eax
je 0x40b329
dec eax
jne 0x40b30d
push dword [ebp + 8]
push 0x40a8ba
push dword [0x42be80]
push str.RENAMEDLG
push dword [0x42bd5c]
call esi
test eax, eax
je 0x40b28f
mov al, 0x52
jmp 0x40b33d
dec eax
je 0x40b31e
dec eax
mov al, 0x4e
jne 0x40b33d
mov byte [0x42be6f], 1
jmp 0x40b33d
mov byte [0x42be72], 1
mov al, 0x43
jmp 0x40b33d
mov byte [0x42be6e], 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 0x40b33d
Function at 0x40cbad
Capabilities:
Accept command line arguments
Read file via mapping
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
push 1
call fcn.0040d227
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
mov ecx, 0x431f08
call fcn.0040dc80
mov esi, 0x5800
push esi
push ebx
mov edi, 0x426558
push edi
call fcn.004098fc
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x40cc5b
push eax
call fcn.0040abcb
cmp byte [0x42be91], bl
je 0x40cc4d
push str.winrarsfxmappingfile.tmp
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x40cc42
push esi
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x40cc39
push esi
push eax
push edi
call fcn.00409929
push edi
push str.sfxcmd
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40cc5b
push dword [ebp - 8]
push str.sfxcmd
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x400
mov esi, 0x425d58
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
push str.sfxname
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
push 0x64
push edi
mov dword [0x42bd5c], edi
mov dword [0x42be68], edi
call dword [sym.imp.USER32.dll_LoadIconW]
push 0x65
push dword [0x42be68]
mov dword [0x425d54], eax
call dword [sym.imp.USER32.dll_LoadBitmapW]
lea ecx, [ebp - 0xc]
mov dword [0x425d50], eax
call fcn.0040e056
push esi
mov ecx, 0x42cfc4
call fcn.00409652
lea ecx, [ebp - 0x5c]
call fcn.004052d7
lea ecx, [ebp - 0x34]
call fcn.004052d7
push 0x64
call fcn.0040a29e
push 0x64
mov dword [ebp - 0x40], eax
call fcn.0040a29e
push ebx
push 0x40c38d
mov dword [ebp - 0x18], eax
push ebx
lea eax, [ebp - 0x5c]
mov dword [0x42554c], eax
push str.STARTDLG
lea eax, [ebp - 0x34]
push edi
mov dword [0x425548], eax
call dword [sym.imp.USER32.dll_DialogBoxParamW]
lea ecx, [ebp - 0x34]
mov dword [0x425548], ebx
mov dword [0x42554c], ebx
call fcn.004052f9
lea ecx, [ebp - 0x5c]
call fcn.004052f9
lea ecx, [ebp - 0xc]
call fcn.0040e0b0
cmp byte [0x42be88], bl
je 0x40cd3a
call fcn.0040ae05
push 0x100
push ebx
push 0x42bd68
call fcn.004098fc
cmp dword [0x42cfa4], ebx
jbe 0x40cd5d
push dword [0x42cf98]
call fcn.004096fe
push dword [0x425d54]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
call esi
mov eax, dword [0x425d50]
cmp eax, ebx
je 0x40cd77
push eax
call esi
cmp dword [0x42cfb8], ebx
jne 0x40cd96
cmp byte [0x42be72], bl
je 0x40cd96
push 0xff
mov ecx, 0x42cfb8
call fcn.004019c1
mov eax, dword [0x42cfb0]
mov byte [0x42be72], 1
cmp eax, ebx
je 0x40cdac
push eax
call fcn.0040adc6
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [0x42cfac]
cmp eax, ebx
ja 0x40cdc0
mov eax, dword [0x42cfb8]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x40d5ad
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [0x4234ac]
mov ecx, eax
xor ecx, dword [esp + 4]
shr eax, 8
mov edx, 0xff
and ecx, edx
xor eax, dword [ecx*4 + 0x4110d0]
mov ecx, dword [0x4234b4]
mov dword [0x4234ac], eax
movzx eax, al
add eax, dword [0x4234b0]
imul eax, eax, 0x8088405
inc eax
mov dword [0x4234b0], eax
shr eax, 0x18
xor eax, ecx
and eax, edx
shr ecx, 8
xor ecx, dword [eax*4 + 0x4110d0]
mov eax, dword [esp + 4]
mov dword [0x4234b4], ecx
ret 4

Function at 0x40d640
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push dword [ebp + 0xc]
call fcn.0040d607
push 0xc
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.00409929
xor esi, esi
lea edx, [ebp + esi - 0xc]
call fcn.0040d58d
xor byte [edx], al
movzx eax, byte [edx]
push eax
call fcn.0040d5ad
inc esi
cmp esi, 0xc
jl 0x40d65f
movzx ax, byte [ebp - 1]
movzx ecx, ax
mov eax, dword [0x412b48]
test byte [eax + 0x40], 2
movzx eax, byte [0x422bc7]
jne 0x40d69a
movzx eax, byte [0x422bcf]
movzx ecx, cx
cmp ecx, eax
je 0x40d6a6
or eax, 0xffffffff
jmp 0x40d6eb
mov ecx, dword [0x422b60]
mov eax, ecx
cdq
cmp edx, dword [0x411924]
push edi
jl 0x40d6c8
mov edx, dword [0x411920]
jg 0x40d6c4
cmp eax, edx
jbe 0x40d6c8
mov edi, edx
jmp 0x40d6ca
mov edi, ecx
mov esi, dword [0x422b58]
jmp 0x40d6e4
dec edi
call fcn.0040d58d
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.0040d5ad
inc esi
test edi, edi
jne 0x40d6d2
xor eax, eax
pop edi
pop esi
leave
ret 8

Function at 0x40defb
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea eax, [ebp - 4]
push eax
push 0x40fc20
push 1
xor ebx, ebx
push ebx
push 0x40fcd0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40dfcc
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
lea edx, [ebp - 8]
push edx
push 0x40fcc0
push eax
call dword [ecx]
test eax, eax
jl 0x40dfc3
cmp byte [ebp + 8], bl
je 0x40df4e
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push 2
push dword [ebp + 0x10]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
cmp dword [ebp + 0x18], ebx
je 0x40df6b
mov eax, dword [ebp - 4]
push dword [ebp + 0x18]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ebx
cmp dword [ebp + 0x1c], ebx
jne 0x40df7d
push 0x40f2f8
jmp 0x40df80
push dword [ebp + 0x1c]
push eax
call dword [ecx + 0x44]
cmp dword [ebp + 0x20], ebx
je 0x40df95
mov eax, dword [ebp - 4]
push dword [ebp + 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
cmp dword [ebp + 0x14], ebx
je 0x40dfa6
mov eax, dword [ebp - 4]
push dword [ebp + 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push 1
push dword [ebp + 0x10]
push eax
call dword [ecx + 0x18]
test eax, eax
jl 0x40dfba
mov bl, 1
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]
mov al, bl
pop ebx
leave
ret 0x1c
Function at 0x40dfe6
Capabilities:
Get common file path

Disassembly:
push dword [esp + 4]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
neg eax
sbb eax, eax
neg eax
ret 8