joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402478
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x254
mov eax, dword [0x408004]
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
push esi
mov esi, ecx
push edi
test esi, esi
je 0x4025b7
cmp byte [esi], 0
je 0x4025b7
push ecx
push esi
push ecx
mov ebx, 0x104
lea ecx, [esp + 0x15c]
mov edx, ebx
call fcn.00401823
push 0x401204
mov edx, ebx
lea ecx, [esp + 0x154]
call fcn.00401759
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4025b7
push ecx
push esi
push ecx
mov edx, ebx
lea ecx, [esp + 0x15c]
call fcn.00401823
test byte [esp + 0x10], 0x10
lea eax, [esp + 0x3c]
je 0x402565
push 0x401208
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402595
push 0x40120c
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402595
lea eax, [esp + 0x3c]
mov edx, ebx
push eax
lea ecx, [esp + 0x154]
call fcn.00401759
push 0x401150
mov edx, ebx
lea ecx, [esp + 0x154]
call fcn.004067c6
lea ecx, [esp + 0x150]
call fcn.00402478
jmp 0x402595
push eax
mov edx, ebx
lea ecx, [esp + 0x154]
call fcn.00401759
push 0x80
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4024f1
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ecx, dword [esp + 0x25c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00406f80
mov esp, ebp
pop ebp
ret

Function at 0x402721
Capabilities:
Get common file path
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
movzx edx, cx
xor eax, eax
push esi
test dx, dx
je 0x402748
xor esi, esi
inc esi
cmp dx, si
je 0x402742
jbe 0x40274e
cmp cx, 3
ja 0x40274e
pop esi
jmp fcn.00402663
pop esi
jmp fcn.004026c1
pop esi
jmp fcn.004025d2
pop esi
ret
Function at 0x4028a1
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x110], eax
mov byte [edi], al
cmp byte [ebx], 0x23
jne 0x4029fb
inc ebx
movsx eax, byte [ebx]
push eax
call dword [sym.imp.USER32.dll_CharUpperA]
push ebx
mov byte [ebp - 0x109], al
call dword [sym.imp.USER32.dll_CharNextA]
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov ebx, eax
mov esi, 0x104
mov al, byte [ebp - 0x109]
cmp al, 0x53
je 0x4029e8
cmp al, 0x57
je 0x4029de
push ecx
push 0x401220
push ecx
mov edx, esi
mov dword [ebp - 0x11c], esi
lea ecx, [ebp - 0x108]
call fcn.00401823
push ebx
mov edx, esi
lea ecx, [ebp - 0x108]
call fcn.004067c6
lea eax, [ebp - 0x118]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x108]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402a08
lea eax, [ebp - 0x11c]
push eax
push edi
lea eax, [ebp - 0x114]
push eax
push 0
push 0x401150
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4029d0
mov eax, dword [ebp - 0x114]
cmp eax, 2
jne 0x4029c3
push esi
lea eax, [ebp - 0x108]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x4029bd
lea eax, [ebp - 0x108]
mov edx, esi
push eax
mov ecx, edi
call fcn.00401726
mov dword [ebp - 0x110], 1
jmp 0x4029d0
mov eax, dword [ebp - 0x114]
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x4029d0
mov dword [ebp - 0x110], ecx
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4029f0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x402a08
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp dword [ebp - 0x110], 0
jne 0x402a12
jmp 0x402a08
mov esi, 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ebx
mov edx, esi
mov ecx, edi
call fcn.004067c6
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.00406f80
leave
ret 4
Function at 0x402a2c
Capabilities:
Get file version info

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
mov dword [ebp - 8], edx
mov edx, ecx
push esi
xor esi, esi
mov dword [ebp - 0xc], edx
push edi
mov edi, esi
mov ebx, esi
mov dword [ebp - 0x10], edi
cmp dword [edx + 0x7c], esi
jle 0x402ba6
mov eax, esi
mov dword [ebp - 4], esi
mov ecx, dword [edx + 0x80]
add eax, edx
add edx, 0x84
mov dword [ebp - 0x14], ecx
mov eax, dword [eax + ecx + 0xbc]
mov ecx, dword [ebp - 8]
add eax, edx
push eax
call fcn.004028a1
test eax, eax
je 0x402ba9
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeA]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x402b70
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x402bd0
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x402bc9
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push dword [ebp - 8]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoA]
test eax, eax
je 0x402b64
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x401254
push dword [ebp - 0x20]
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
je 0x402b64
cmp dword [ebp - 0x24], 0
je 0x402b64
mov eax, dword [ebp - 0x28]
mov edi, esi
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
add ecx, 0x94
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0xc]
add eax, ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov esi, eax
push dword [esi - 0xc]
push dword [esi - 0x10]
call fcn.00402bdd
push dword [esi]
mov dword [ebp + edi - 0x34], eax
push dword [esi - 4]
call fcn.00402bdd
mov dword [ebp + edi - 0x3c], eax
lea esi, [esi + 0x18]
add edi, 4
cmp edi, 8
jl 0x402b23
mov edi, dword [ebp - 0x10]
xor esi, esi
cmp dword [ebp - 0x34], esi
jl 0x402b5a
cmp dword [ebp - 0x3c], esi
jle 0x402b64
cmp dword [ebp - 0x30], esi
jl 0x402bc2
cmp dword [ebp - 0x38], esi
jg 0x402bc2
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [ebp - 0xc]
jmp 0x402b90
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
add eax, edx
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
cmp dword [eax + ecx + 0x84], esi
jne 0x402ba9
cmp dword [eax + ecx + 0x88], esi
jne 0x402ba9
mov eax, dword [ebp - 4]
inc edi
add eax, 0x3c
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], eax
cmp edi, dword [edx + 0x7c]
jl 0x402a56
xor esi, esi
inc esi
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
test ebx, ebx
je 0x402bb9
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
jmp 0x402bb2
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
jmp 0x402bb9
Function at 0x402e31
Capabilities:
Check mutex on windows
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x8fc
xor edi, edi
mov esi, ecx
push edi
push 0x409140
mov ebx, edx
mov dword [0x409a3c], esi
call sub.msvcrt.dll_memset
push 0x32c
push edi
push 0x408a20
call sub.msvcrt.dll_memset
push 0x104
push edi
push 0x4088c0
call sub.msvcrt.dll_memset
add esp, 0x24
xor eax, eax
inc eax
mov edx, 0x409154
mov ecx, 0x401288
mov dword [0x4093ec], eax
push 0x7f
call fcn.00404831
test eax, eax
je 0x40307a
cmp eax, 0x80
ja 0x40307a
push edi
xor eax, eax
inc eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push eax
mov dword [0x40858c], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 4
mov edx, 0x409a34
mov ecx, 0x401290
call fcn.00404831
test eax, eax
jne 0x402f04
xor eax, eax
mov edx, 0x4b1
push eax
push 0x10
push eax
push eax
xor ecx, ecx
call fcn.00404657
mov dword [0x409124], 0x80070714
jmp 0x40308d
test byte [0x409a34], 0xc0
je 0x402fa6
push 0x104
lea edx, [ebp - 0x108]
mov ecx, 0x40129c
call fcn.00404831
test eax, eax
je 0x402ee2
lea eax, [ebp - 0x108]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x408588], eax
test eax, eax
je 0x402fa6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402fa6
xor ecx, ecx
test byte [0x409a34], 0x80
je 0x402f71
push ecx
push 0x10
push ecx
push 0x409154
mov edx, 0x54b
call fcn.00404657
jmp 0x402f8b
push 4
push 0x20
push 0
push 0x409154
mov edx, 0x524
call fcn.00404657
cmp eax, 6
je 0x402fa6
push dword [0x408588]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x409124], 0x800700b7
jmp 0x40308d
and dword [0x409120], edi
mov ecx, ebx
call fcn.00405ea6
test eax, eax
jne 0x402fc1
mov edx, 0x520
jmp 0x40307f
cmp byte [0x408a3a], 0
je 0x402fd9
mov ecx, 0x408a3a
call fcn.00402478
jmp 0x40308d
push 0xa
push 0x4012ac
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x402ff5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
cmp dword [0x408184], 0
je 0x403004
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
cmp dword [0x408a24], 0
je 0x403012
xor eax, eax
inc eax
jmp 0x40308f
mov ecx, edi
call fcn.004038a8
test eax, eax
je 0x40308d
mov ax, word [0x409a40]
xor ebx, ebx
inc ebx
cmp ax, bx
je 0x403037
cmp ax, 2
je 0x403037
cmp ax, 3
jne 0x403076
test dword [0x409a34], 0x100
je 0x403076
test byte [0x408a38], 1
jne 0x403076
call fcn.00401955
test eax, eax
jne 0x403076
push 0x83e
push 0x547
push 0x401a90
push eax
mov edx, 0x7d6
call fcn.0040674f
cmp eax, 0x83d
jne 0x40308d
mov eax, ebx
jmp 0x40308f
mov edx, 0x4b1
xor eax, eax
xor ecx, ecx
push eax
push 0x10
push eax
push eax
call fcn.00404657
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406f80
leave
ret 4
Function at 0x4030a6
Capabilities:
Get common file path
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
cmp word [0x408a38], 0
push ebx
push esi
push edi
jne 0x4030f5
cmp dword [0x408a24], 0
jne 0x4030e8
call fcn.004053b1
test eax, eax
je 0x4031ca
cmp word [0x408a38], 0
jne 0x4030f5
call fcn.00403baa
test eax, eax
je 0x4031ca
call fcn.0040532a
test eax, eax
je 0x4031ca
call fcn.0040577c
test eax, eax
je 0x4031ca
mov esi, 0x105
lea eax, [ebp - 0x10c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x401154
mov edx, esi
lea ecx, [ebp - 0x10c]
call fcn.004067c6
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
xor edi, edi
test ebx, ebx
je 0x403180
push 0x4012b8
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x110], eax
test eax, eax
je 0x403180
mov esi, esp
mov ecx, eax
push edi
push 0x4091e4
call dword [0x40a288]
call dword [ebp - 0x110]
cmp esi, esp
je 0x403180
mov ecx, 4
int 0x29
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [0x408a24], edi
jne 0x4031a0
cmp dword [0x409a30], edi
jne 0x4031a0
call fcn.00406436
test eax, eax
je 0x4031ca
push 0x4091e4
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x4031db
push edi
push 0x10
push edi
push edi
mov edx, 0x4bc
xor ecx, ecx
call fcn.00404657
call fcn.004064a1
mov dword [0x409124], eax
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406f80
leave
ret
cmp dword [0x408a2c], edi
jne 0x4031ec
call fcn.00403c97
test eax, eax
je 0x4031ca
test byte [0x408d48], 0xc0
jne 0x403203
mov cx, word [0x409a40]
call fcn.00402721
mov edi, eax
mov eax, dword [0x408a24]
mov dword [0x409a44], edi
test eax, eax
jne 0x403228
cmp dword [0x409a30], eax
jne 0x403228
call fcn.00403d19
test eax, eax
je 0x4031ca
mov eax, dword [0x408a24]
cmp word [0x408a38], 0
jne 0x40323b
test eax, eax
jne 0x40323b
call fcn.004042f5
xor eax, eax
inc eax
jmp 0x4031cc
Function at 0x404171
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor esi, esi
mov ebx, ecx
inc esi
xor eax, eax
push edi
test ebx, ebx
je 0x40428c
lea edi, [ebp - 0x21c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x21c]
push eax
push edx
xor edi, edi
push edi
push edi
push 0x20
push edi
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x404246
push 0xffffffffffffffff
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [ebp - 0x20c]
cmp dword [0x408a28], edi
jne 0x404213
mov eax, dword [0x409a2c]
test al, 1
je 0x404213
test al, 2
jne 0x404213
mov eax, ecx
and eax, 0xff000000
cmp eax, 0xaa000000
jne 0x404213
mov dword [0x409a2c], ecx
call fcn.004042a1
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test dword [0x409a34], 0x400
je 0x40428a
cmp dword [ebp - 0x20c], edi
jge 0x40428a
jmp 0x404288
call fcn.004064a1
push edi
mov dword [0x409124], eax
lea eax, [ebp - 0x208]
push 0x200
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push edi
push 0x10
lea eax, [ebp - 0x208]
mov edx, 0x4c4
push eax
push ebx
xor ecx, ecx
call fcn.00404657
mov esi, edi
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406f80
leave
ret
Function at 0x4043ba
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
push str.SHELL32.DLL
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x404548
push str.SHBrowseForFolder
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 8], eax
test eax, eax
je 0x40453a
push 0xc3
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40453a
push str.SHGetPathFromIDList
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x40453a
xor ebx, ebx
cmp byte [0x4088c0], bl
jne 0x40447c
push 0x4088c0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, 0x4088c0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404443
sub ecx, edx
lea eax, [ecx + 0x4088c0]
push eax
push 0x4088c0
call dword [sym.imp.USER32.dll_CharPrevA]
mov dword [ebp - 4], eax
cmp byte [eax], 0x5c
jne 0x40447c
push eax
push 0x4088c0
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x3a
je 0x40447c
mov eax, dword [ebp - 4]
mov byte [eax], bl
lea eax, [ebp - 0x30]
mov byte [0x4087a0], bl
mov dword [ebp - 0x30], esi
mov esi, esp
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 8]
mov ecx, ebx
push eax
mov dword [ebp - 0x24], 0x408598
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], 0x404390
mov dword [ebp - 0x18], 0x4088c0
call dword [0x40a288]
call ebx
cmp esi, esp
je 0x4044c5
mov ecx, 4
int 0x29
mov dword [ebp - 8], eax
test eax, eax
je 0x404526
mov ebx, dword [ebp - 0xc]
mov esi, esp
push 0x4088c0
push eax
mov ecx, ebx
call dword [0x40a288]
call ebx
cmp esi, esp
je 0x4044ec
mov ecx, 4
int 0x29
cmp byte [0x4088c0], 0
je 0x404509
push 0x4088c0
mov edx, 0x104
mov ecx, 0x4087a0
call fcn.00401726
mov ebx, dword [ebp - 0x10]
mov esi, esp
push dword [ebp - 8]
mov ecx, ebx
call dword [0x40a288]
call ebx
cmp esi, esp
je 0x404526
mov ecx, 4
int 0x29
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
cmp byte [0x4087a0], al
setne al
jmp 0x40455d
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, 0x4c1
jmp 0x40454d
mov edx, 0x4c2
xor ebx, ebx
mov ecx, esi
push ebx
push 0x10
push ebx
push ebx
call fcn.00404657
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x404831
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0xa
mov edi, ecx
mov ebx, edx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, dword [ebp + 8]
ja 0x40489d
test ebx, ebx
je 0x40489d
test esi, esi
je 0x40489b
push 0xa
push edi
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40489b
push esi
push edi
push dword [ebp + 8]
push ebx
call dword [sym.imp.msvcrt.dll_memcpy_s]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
jmp 0x40489d
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x404946
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push esi
mov esi, ecx
call fcn.00406900
test eax, eax
jne 0x404957
inc eax
pop esi
ret
cmp dword [0x4091dc], 0
push edi
jne 0x4049a5
test byte [0x408a38], 1
jne 0x4049a5
push 6
xor edi, edi
mov dword [0x409404], esi
push edi
push 0x403600
push dword [0x408584]
mov edx, 0x7d3
call fcn.0040674f
sub eax, 6
je 0x4049a5
sub eax, 1
je 0x4049b4
sub eax, 0x832
jne 0x4049a5
mov dword [0x4091dc], 1
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor edi, edi
inc edi
mov eax, edi
pop edi
pop esi
ret

Function at 0x404b06
Capabilities:
Create directory

Disassembly:
mov edi, edi
push edi
mov edi, ecx
mov cl, byte [edi]
test cl, cl
je 0x404b6d
mov al, byte [edi + 1]
push ebx
xor ebx, ebx
push esi
lea esi, [edi + 2]
cmp al, 0x3a
jne 0x404b29
cmp byte [esi], 0x5c
jne 0x404b29
lea esi, [edi + 3]
jmp 0x404b65
cmp cl, 0x5c
jne 0x404b37
cmp al, cl
jne 0x404b37
push 2
pop ebx
jmp 0x404b65
lea esi, [edi + 1]
jmp 0x404b67
cmp al, 0x5c
jne 0x404b5c
cmp byte [esi - 1], 0x3a
je 0x404b5c
test ebx, ebx
je 0x404b4d
dec ebx
jmp 0x404b5c
push 0
push edi
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov al, byte [esi]
test al, al
jne 0x404b3c
pop esi
pop ebx
pop edi
ret
Function at 0x4051a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebx
push esi
xor ebx, ebx
mov esi, 0x40135c
push ebx
xor edx, edx
mov ecx, esi
call fcn.00404831
push 0xa
push esi
push ebx
mov dword [0x409144], eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [0x409140], eax
test eax, eax
je 0x405321
mov eax, dword [0x408584]
test eax, eax
je 0x405217
push ebx
push 0x842
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 5
push 0x841
push dword [0x408584]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.004050c1
test eax, eax
jne 0x40523c
mov ecx, dword [0x408584]
mov edx, 0x4ba
push ebx
push 0x10
push ebx
push ebx
call fcn.00404657
mov esi, ebx
jmp 0x4052c7
push edi
push 0x409148
push 1
push 0x404dd0
push fcn.00404d70
push 0x404cd0
push 0x404c50
push fcn.00404b80
push 0x404ed0
push 0x404eb0
call dword [sym.imp.Cabinet.dll_FDICreate]
mov edi, eax
add esp, 0x24
test edi, edi
je 0x4052a8
push 0x409140
push ebx
push 0x404ef0
push ebx
push 0x401150
push str.MEMCAB
push edi
call dword [sym.imp.Cabinet.dll_FDICopy]
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x4052c6
push edi
call dword [sym.imp.Cabinet.dll_FDIDestroy]
pop ecx
test eax, eax
jne 0x4052c6
mov edx, dword [0x409148]
mov ecx, dword [0x408584]
push ebx
push 0x10
push ebx
push ebx
lea edx, [edx + 0x514]
call fcn.00404657
mov esi, ebx
pop edi
mov eax, dword [0x409140]
test eax, eax
je 0x4052dd
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [0x409140], ebx
test esi, esi
jne 0x4052fa
cmp dword [0x4091d8], ebx
jne 0x4052fa
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4f8
xor ecx, ecx
call fcn.00404657
test byte [0x408a38], 1
jne 0x40531f
test byte [0x409a34], 1
jne 0x40531f
push ebx
push esi
push 0xfa1
push dword [0x408584]
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, esi
pop esi
pop ebx
ret
Function at 0x405488
Capabilities:
Delete file
Set current directory
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [0x4091e0]
test esi, esi
je 0x4054e9
push edi
cmp dword [0x408a24], 0
mov edi, esi
jne 0x4054d2
cmp dword [0x409a30], 0
jne 0x4054d2
push 0x80
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [edi]
mov esi, dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
jne 0x4054a9
pop edi
mov eax, dword [0x408a20]
pop esi
test eax, eax
je 0x40554b
cmp dword [0x408a24], 0
jne 0x40554b
cmp dword [0x409a30], 0
jne 0x40554b
push ecx
push 0x4091e4
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.00401823
test byte [0x409a34], 0x20
je 0x405530
lea ecx, [ebp - 0x108]
call fcn.0040682a
push 0x40120c
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x108]
call fcn.00402478
mov eax, dword [0x408a20]
cmp word [0x409a40], 1
je 0x40555e
test eax, eax
je 0x40555e
call fcn.004020c2
mov ecx, dword [ebp - 4]
and dword [0x408a20], 0
xor ecx, ebp
call fcn.00406f80
leave
ret

Function at 0x405577
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, edx
mov ebx, ecx
xor edi, edi
push edi
push 0x401388
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.004017be
add esp, 0x10
mov edx, 0x104
mov ecx, esi
inc edi
push ebx
call fcn.00401726
lea eax, [ebp - 0x108]
mov edx, 0x104
push eax
mov ecx, esi
call fcn.004067c6
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405623
cmp edi, 0x190
jl 0x405595
push esi
xor edi, edi
push edi
push 0x401394
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x405610
push esi
inc edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406f80
leave
ret 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4055eb
xor edi, edi
inc edi
mov dword [0x408a20], edi
jmp 0x405610