joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4028c8
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
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, ecx
mov dword [ebp - 0x110], esi
mov byte [edi], bl
cmp byte [esi], 0x23
jne 0x402a1d
inc esi
movsx eax, byte [esi]
push eax
call dword [sym.imp.USER32.dll_CharUpperA]
push esi
mov byte [ebp - 0x109], al
call dword [sym.imp.USER32.dll_CharNextA]
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov dword [ebp - 0x110], eax
mov al, byte [ebp - 0x109]
cmp al, 0x41
je 0x402953
cmp al, 0x53
je 0x402941
cmp al, 0x57
jne 0x402953
mov esi, 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x402a17
mov esi, 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x402a17
push ecx
push 0x401228
mov esi, 0x104
push ecx
mov edx, esi
mov dword [ebp - 0x11c], esi
lea ecx, [ebp - 0x108]
call fcn.00401846
push dword [ebp - 0x110]
mov edx, esi
lea ecx, [ebp - 0x108]
call fcn.00406836
lea eax, [ebp - 0x118]
push eax
push 0x20019
push ebx
lea eax, [ebp - 0x108]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402a17
lea eax, [ebp - 0x11c]
push eax
push edi
lea eax, [ebp - 0x114]
push eax
push ebx
push 0x401158
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402a0b
mov eax, dword [ebp - 0x114]
cmp eax, 2
jne 0x402a03
push esi
lea eax, [ebp - 0x108]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x4029fd
lea eax, [ebp - 0x108]
mov edx, esi
push eax
mov ecx, edi
call fcn.00401740
jmp 0x402a08
mov eax, dword [ebp - 0x114]
cmp eax, 1
jne 0x402a0b
xor ebx, ebx
inc ebx
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x402a39
jmp 0x402a2a
mov esi, 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push dword [ebp - 0x110]
mov edx, esi
mov ecx, edi
call fcn.00406836
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.00406ff0
leave
ret 4
Function at 0x402a53
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 0x402bcd
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.004028c8
test eax, eax
je 0x402bd0
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 0x402b97
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x402bf7
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x402bf0
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 0x402b8b
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x40125c
push dword [ebp - 0x20]
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
je 0x402b8b
cmp dword [ebp - 0x24], 0
je 0x402b8b
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.00402c04
push dword [esi]
mov dword [ebp + edi - 0x34], eax
push dword [esi - 4]
call fcn.00402c04
mov dword [ebp + edi - 0x3c], eax
lea esi, [esi + 0x18]
add edi, 4
cmp edi, 8
jl 0x402b4a
mov edi, dword [ebp - 0x10]
xor esi, esi
cmp dword [ebp - 0x34], esi
jl 0x402b81
cmp dword [ebp - 0x3c], esi
jle 0x402b8b
cmp dword [ebp - 0x30], esi
jl 0x402be9
cmp dword [ebp - 0x38], esi
jg 0x402be9
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [ebp - 0xc]
jmp 0x402bb7
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 0x402bd0
cmp dword [eax + ecx + 0x88], esi
jne 0x402bd0
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 0x402a7d
xor esi, esi
inc esi
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
test ebx, ebx
je 0x402be0
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 0x402bd9
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
jmp 0x402be0
Function at 0x402e59
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, 0x401290
mov dword [0x4093ec], eax
push 0x7f
call fcn.004048a1
test eax, eax
je 0x4030aa
cmp eax, 0x80
ja 0x4030aa
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, 0x401298
call fcn.004048a1
test eax, eax
jne 0x402f2c
xor eax, eax
mov edx, 0x4b1
push eax
push 0x10
push eax
push eax
xor ecx, ecx
call fcn.004046c7
mov dword [0x409124], 0x80070714
jmp 0x4030bd
test byte [0x409a34], 0xc0
je 0x402fce
push 0x104
lea edx, [ebp - 0x108]
mov ecx, 0x4012a4
call fcn.004048a1
test eax, eax
je 0x402f0a
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 0x402fce
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402fce
xor ecx, ecx
test byte [0x409a34], 0x80
je 0x402f99
push ecx
push 0x10
push ecx
push 0x409154
mov edx, 0x54b
call fcn.004046c7
jmp 0x402fb3
push 4
push 0x20
push 0
push 0x409154
mov edx, 0x524
call fcn.004046c7
cmp eax, 6
je 0x402fce
push dword [0x408588]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x409124], 0x800700b7
jmp 0x4030bd
and dword [0x409120], edi
mov ecx, ebx
call fcn.00405f17
test eax, eax
jne 0x402fe9
mov edx, 0x520
jmp 0x4030af
cmp byte [0x408a3a], 0
je 0x403001
mov ecx, 0x408a3a
call fcn.0040249e
jmp 0x4030bd
push 0xa
push 0x4012b4
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40301d
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
cmp dword [0x408184], 0
je 0x40302c
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
cmp dword [0x408a24], 0
je 0x40303d
xor eax, eax
inc eax
jmp 0x4030bf
mov ecx, edi
call fcn.004038c7
test eax, eax
je 0x4030bd
mov ax, word [0x409a40]
xor ebx, ebx
inc ebx
cmp ax, bx
je 0x403062
cmp ax, 2
je 0x403062
cmp ax, 3
jne 0x4030a6
test dword [0x409a34], 0x100
je 0x4030a6
test byte [0x408a38], 1
jne 0x4030a6
call fcn.00401978
test eax, eax
jne 0x4030a6
push 0x83e
push 0x547
push 0x401ac0
push eax
mov edx, 0x7d6
call fcn.004067bf
sub eax, 0x83d
neg eax
sbb eax, eax
inc eax
jmp 0x4030bf
mov eax, ebx
jmp 0x4030bf
mov edx, 0x4b1
xor eax, eax
xor ecx, ecx
push eax
push 0x10
push eax
push eax
call fcn.004046c7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406ff0
leave
ret 4
Function at 0x4030d6
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 0x403125
cmp dword [0x408a24], 0
jne 0x403118
call fcn.00405411
test eax, eax
je 0x4031fa
cmp word [0x408a38], 0
jne 0x403125
call fcn.00403c17
test eax, eax
je 0x4031fa
call fcn.0040538a
test eax, eax
je 0x4031fa
call fcn.004057ed
test eax, eax
je 0x4031fa
mov esi, 0x105
lea eax, [ebp - 0x10c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x40115c
mov edx, esi
lea ecx, [ebp - 0x10c]
call fcn.00406836
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
xor edi, edi
test ebx, ebx
je 0x4031b0
push 0x4012c0
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x110], eax
test eax, eax
je 0x4031b0
mov esi, esp
mov ecx, eax
push edi
push 0x4091e4
call dword [0x40a288]
call dword [ebp - 0x110]
cmp esi, esp
je 0x4031b0
mov ecx, 4
int 0x29
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [0x408a24], edi
jne 0x4031d0
cmp dword [0x409a30], edi
jne 0x4031d0
call fcn.004064a7
test eax, eax
je 0x4031fa
push 0x4091e4
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40320b
push edi
push 0x10
push edi
push edi
mov edx, 0x4bc
xor ecx, ecx
call fcn.004046c7
call fcn.00406512
mov dword [0x409124], eax
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406ff0
leave
ret
cmp dword [0x408a2c], edi
jne 0x40321c
call fcn.00403d04
test eax, eax
je 0x4031fa
test byte [0x408d48], 0xc0
jne 0x403233
mov cx, word [0x409a40]
call fcn.00402747
mov edi, eax
mov eax, dword [0x408a24]
mov dword [0x409a44], edi
test eax, eax
jne 0x403258
cmp dword [0x409a30], eax
jne 0x403258
call fcn.00403d86
test eax, eax
je 0x4031fa
mov eax, dword [0x408a24]
cmp word [0x408a38], 0
jne 0x40326b
test eax, eax
jne 0x40326b
call fcn.00404366
xor eax, eax
inc eax
jmp 0x4031fc
Function at 0x4041e2
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 0x4042fd
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 0x4042b7
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 0x404284
mov eax, dword [0x409a2c]
test al, 1
je 0x404284
test al, 2
jne 0x404284
mov eax, ecx
and eax, 0xff000000
cmp eax, 0xaa000000
jne 0x404284
mov dword [0x409a2c], ecx
call fcn.00404312
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 0x4042fb
cmp dword [ebp - 0x20c], edi
jge 0x4042fb
jmp 0x4042f9
call fcn.00406512
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.004046c7
mov esi, edi
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406ff0
leave
ret
Function at 0x40442a
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 0x4045b8
push str.SHBrowseForFolder
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 8], eax
test eax, eax
je 0x4045aa
push 0xc3
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4045aa
push str.SHGetPathFromIDList
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4045aa
xor ebx, ebx
cmp byte [0x4088c0], bl
jne 0x4044ec
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 0x4044b3
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 0x4044ec
push eax
push 0x4088c0
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x3a
je 0x4044ec
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], 0x404400
mov dword [ebp - 0x18], 0x4088c0
call dword [0x40a288]
call ebx
cmp esi, esp
je 0x404535
mov ecx, 4
int 0x29
mov dword [ebp - 8], eax
test eax, eax
je 0x404596
mov ebx, dword [ebp - 0xc]
mov esi, esp
push 0x4088c0
push eax
mov ecx, ebx
call dword [0x40a288]
call ebx
cmp esi, esp
je 0x40455c
mov ecx, 4
int 0x29
cmp byte [0x4088c0], 0
je 0x404579
push 0x4088c0
mov edx, 0x104
mov ecx, 0x4087a0
call fcn.00401740
mov ebx, dword [ebp - 0x10]
mov esi, esp
push dword [ebp - 8]
mov ecx, ebx
call dword [0x40a288]
call ebx
cmp esi, esp
je 0x404596
mov ecx, 4
int 0x29
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
cmp byte [0x4087a0], al
setne al
jmp 0x4045cd
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, 0x4c1
jmp 0x4045bd
mov edx, 0x4c2
xor ebx, ebx
mov ecx, esi
push ebx
push 0x10
push ebx
push ebx
call fcn.004046c7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4048a1
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 0x40490d
test ebx, ebx
je 0x40490d
test esi, esi
je 0x40490b
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 0x40490b
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 0x40490d
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x4049b6
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push esi
push edi
xor esi, esi
mov edi, ecx
inc esi
call fcn.00406975
test eax, eax
je 0x404a1b
cmp dword [0x4091dc], 0
jne 0x404a0f
test byte [0x408a38], 1
jne 0x404a0f
push 6
push 0
push 0x403630
push dword [0x408584]
mov edx, 0x7d3
mov dword [0x409404], edi
call fcn.004067bf
sub eax, 6
je 0x404a0f
sub eax, esi
je 0x404a20
sub eax, 0x832
jne 0x404a0f
mov dword [0x4091dc], esi
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
mov eax, esi
pop esi
ret
xor esi, esi
jmp 0x404a1b

Function at 0x404b71
Capabilities:
Create directory

Disassembly:
mov edi, edi
push edi
mov edi, ecx
mov cl, byte [edi]
test cl, cl
je 0x404bd8
mov al, byte [edi + 1]
push ebx
xor ebx, ebx
push esi
lea esi, [edi + 2]
cmp al, 0x3a
jne 0x404b94
cmp byte [esi], 0x5c
jne 0x404b94
lea esi, [edi + 3]
jmp 0x404bd0
cmp cl, 0x5c
jne 0x404ba2
cmp al, cl
jne 0x404ba2
push 2
pop ebx
jmp 0x404bd0
lea esi, [edi + 1]
jmp 0x404bd2
cmp al, 0x5c
jne 0x404bc7
cmp byte [esi - 1], 0x3a
je 0x404bc7
test ebx, ebx
je 0x404bb8
dec ebx
jmp 0x404bc7
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 0x404ba7
pop esi
pop ebx
pop edi
ret
Function at 0x405200
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebx
push esi
xor ebx, ebx
mov esi, 0x401364
push ebx
xor edx, edx
mov ecx, esi
call fcn.004048a1
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 0x405381
mov eax, dword [0x408584]
test eax, eax
je 0x405277
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.00405121
test eax, eax
jne 0x40529c
mov ecx, dword [0x408584]
mov edx, 0x4ba
push ebx
push 0x10
push ebx
push ebx
call fcn.004046c7
mov esi, ebx
jmp 0x405327
push edi
push 0x409148
push 1
push 0x404e30
push fcn.00404dd0
push 0x404d30
push 0x404cb0
push fcn.00404be0
push 0x404f30
push 0x404f10
call dword [sym.imp.Cabinet.dll_FDICreate]
mov edi, eax
add esp, 0x24
test edi, edi
je 0x405308
push 0x409140
push ebx
push 0x404f50
push ebx
push 0x401158
push str.MEMCAB
push edi
call dword [sym.imp.Cabinet.dll_FDICopy]
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x405326
push edi
call dword [sym.imp.Cabinet.dll_FDIDestroy]
pop ecx
test eax, eax
jne 0x405326
mov edx, dword [0x409148]
mov ecx, dword [0x408584]
push ebx
push 0x10
push ebx
push ebx
lea edx, [edx + 0x514]
call fcn.004046c7
mov esi, ebx
pop edi
mov eax, dword [0x409140]
test eax, eax
je 0x40533d
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [0x409140], ebx
test esi, esi
jne 0x40535a
cmp dword [0x4091d8], ebx
jne 0x40535a
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4f8
xor ecx, ecx
call fcn.004046c7
test byte [0x408a38], 1
jne 0x40537f
test byte [0x409a34], 1
jne 0x40537f
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 0x4054e8
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 0x405549
push edi
cmp dword [0x408a24], 0
mov edi, esi
jne 0x405532
cmp dword [0x409a30], 0
jne 0x405532
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 0x405509
pop edi
mov eax, dword [0x408a20]
pop esi
test eax, eax
je 0x4055ab
cmp dword [0x408a24], 0
jne 0x4055ab
cmp dword [0x409a30], 0
jne 0x4055ab
push ecx
push 0x4091e4
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.00401846
test byte [0x409a34], 0x20
je 0x405590
lea ecx, [ebp - 0x108]
call fcn.0040689a
push 0x401214
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x108]
call fcn.0040249e
mov eax, dword [0x408a20]
cmp word [0x409a40], 1
je 0x4055be
test eax, eax
je 0x4055be
call fcn.004020f6
mov ecx, dword [ebp - 4]
and dword [0x408a20], 0
xor ecx, ebp
call fcn.00406ff0
leave
ret

Function at 0x4055d7
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, 0x10c
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10c], ecx
mov edi, edx
xor esi, esi
push ebx
push 0x401390
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.004017e1
add esp, 0x10
mov edx, 0x104
mov ecx, edi
inc ebx
push dword [ebp - 0x10c]
call fcn.00401740
lea eax, [ebp - 0x108]
mov edx, 0x104
push eax
mov ecx, edi
call fcn.00406836
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405694
cmp ebx, 0x190
jl 0x4055fb
push edi
push 0
push 0x40139c
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x405681
xor esi, esi
push edi
inc esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406ff0
leave
ret 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor esi, esi
test eax, eax
je 0x405656
inc esi
mov dword [0x408a20], esi
jmp 0x405681
Function at 0x405b19
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x405b29
sub edx, ecx
lea esi, [edx + 0x14]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x405b68
xor esi, esi
mov edx, 0x4b5
push esi
push 0x10
push esi
push esi
xor ecx, ecx
call fcn.004046c7
call fcn.00406512
mov dword [0x409124], eax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push edi
mov edx, esi
mov ecx, ebx
call fcn.00401740
push 0x4013d0
mov edx, esi
mov ecx, ebx
call fcn.00406836
xor esi, esi
push esi
push 0x4000080
push 1
push esi
push esi
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
cmp eax, 0xffffffff
je 0x405b57
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405b57
test al, 0x10
je 0x405b57
xor eax, eax
mov dword [0x409124], esi
inc eax
jmp 0x405b63