joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402146
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 [section..data]
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
push esi
push ecx
pop esi
push edi
or esi, esi
je 0x40228b
cmp byte [esi], 0
je 0x40228b
mov ebx, 0x104
lea ecx, [esp + 0x150]
push esi
mov edx, ebx
call fcn.00401405
push 0x401144
push ebx
pop edx
lea ecx, [esp + 0x154]
call fcn.0040143d
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
pop edi
cmp edi, 0xffffffff
je 0x40228b
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push esi
mov edx, 0x104
lea ecx, [esp + 0x154]
call fcn.00401405
test byte [esp + 0x10], 0x10
lea eax, [esp + 0x3c]
je 0x402236
push 0x401148
push eax
call ebx
or eax, eax
je 0x402269
push 0x40114c
lea eax, [esp + 0x40]
push eax
call ebx
or eax, eax
je 0x402269
lea eax, [esp + 0x3c]
mov edx, 0x104
push eax
lea ecx, [esp + 0x154]
call fcn.0040143d
push 0x401091
mov edx, 0x104
lea ecx, [esp + 0x154]
call fcn.004062ff
lea ecx, [esp + 0x150]
call fcn.00402146
jmp 0x402269
push eax
mov edx, 0x104
lea ecx, [esp + 0x154]
call fcn.0040143d
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 0x4021c3
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.004069ed
mov esp, ebp
pop ebp
ret

Function at 0x402337
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
pushal
popal
push ebp
push esp
pop ebp
push ecx
push ecx
push esi
movzx eax, cx
sub esi, esi
or eax, eax
je 0x4023e4
cmp eax, 1
je 0x4023aa
add eax, 0xfffffffe
cmp eax, 1
ja 0x4023eb
lea eax, [ebp - 8]
mov dword [ebp - 4], esi
push eax
push 0x20019
push esi
push str.SystemCurrentControlSetControlSession_Manager
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
or eax, eax
jne 0x4023a5
lea eax, [ebp - 4]
push eax
push esi
push esi
push esi
push str.PendingFileRenameOperations
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 8]
neg eax
sbb eax, eax
not eax
and dword [ebp - 4], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 4]
jmp 0x4023eb
lea eax, [ebp - 8]
mov dword [ebp - 4], esi
push eax
push 0x20019
push esi
push str.SystemCurrentControlSetControlSession_ManagerFileRenameOperations
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
or eax, eax
jne 0x4023a5
push esi
push esi
push esi
push esi
lea eax, [ebp - 4]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
jmp 0x402393
call 0x4022a5
push eax
pop esi
mov eax, esi
pop esi
push ebp
pop esp
pop ebp
ret
Function at 0x402544
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 [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
sub ebx, ebx
push edi
push ecx
pop edi
mov dword [ebp - 0x110], esi
mov byte [edi], bl
cmp byte [esi], 0x23
jne 0x402681
inc esi
movsx eax, byte [esi]
push eax
call dword [sym.imp.USER32.dll_CharUpperA]
push esi
mov esi, dword [sym.imp.USER32.dll_CharNextA]
mov byte [ebp - 0x109], al
call esi
push eax
call esi
mov dword [ebp - 0x110], eax
mov esi, 0x104
mov al, byte [ebp - 0x109]
cmp al, 0x53
je 0x402686
cmp al, 0x57
je 0x402677
push ecx
push 0x401160
push ecx
push esi
pop edx
mov dword [ebp - 0x11c], esi
lea ecx, [ebp - 0x108]
call fcn.0040150c
push dword [ebp - 0x110]
push esi
pop edx
lea ecx, [ebp - 0x108]
call fcn.004062ff
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]
or eax, eax
jne 0x402692
lea eax, [ebp - 0x11c]
push eax
push edi
lea eax, [ebp - 0x114]
push eax
push ebx
push 0x401091
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402669
mov eax, dword [ebp - 0x114]
cmp eax, 2
jne 0x402661
push esi
lea eax, [ebp - 0x108]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x40265b
lea eax, [ebp - 0x108]
mov edx, esi
push eax
mov ecx, edi
call fcn.00401405
jmp 0x402666
mov eax, dword [ebp - 0x114]
cmp eax, 1
jne 0x402669
sub ebx, ebx
inc ebx
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40268e
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x402692
mov esi, 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
or ebx, ebx
jne 0x4026a1
push dword [ebp - 0x110]
push esi
pop edx
push edi
pop ecx
call fcn.004062ff
mov ecx, dword [ebp - 4]
sub eax, eax
pop edi
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.004069ed
push ebp
pop esp
pop ebp
ret 4
Function at 0x4026bc
Capabilities:
Get file version info

Disassembly:
mov edi, edi
push ebp
push esp
pop ebp
sub esp, 0x3c
push ebx
mov dword [ebp - 8], edx
mov edx, ecx
push esi
xor esi, esi
mov dword [ebp - 0xc], edx
push esi
pop ebx
push edi
mov edi, esi
mov dword [ebp - 0x10], ebx
cmp dword [edx + 0x7c], esi
jle 0x402835
mov eax, esi
mov dword [ebp - 4], esi
mov ecx, dword [edx + 0x80]
add eax, edx
mov dword [ebp - 0x14], ecx
mov eax, dword [eax + ecx + 0xbc]
mov ecx, dword [ebp - 8]
add eax, 0x84
add eax, edx
push eax
call fcn.00402544
or eax, eax
je 0x402838
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 0x4027ff
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
pop edi
test edi, edi
je 0x402838
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x402838
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 0x4027f3
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x401194
push dword [ebp - 0x20]
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
je 0x4027f3
cmp dword [ebp - 0x24], 0
je 0x4027f3
mov eax, dword [ebp - 0x28]
push esi
pop ebx
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.00402861
push dword [esi]
mov dword [ebp + ebx - 0x34], eax
push dword [esi - 4]
call fcn.00402861
mov dword [ebp + ebx - 0x3c], eax
lea esi, [esi + 0x18]
add ebx, 4
cmp ebx, 8
jl 0x4027b2
mov ebx, dword [ebp - 0x10]
xor esi, esi
cmp dword [ebp - 0x34], esi
jl 0x4027e9
cmp dword [ebp - 0x3c], esi
jle 0x4027f3
cmp dword [ebp - 0x30], esi
jl 0x402853
cmp dword [ebp - 0x38], esi
jg 0x402853
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [ebp - 0xc]
jmp 0x40281f
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
add eax, edx
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x10]
cmp dword [eax + ecx + 0x84], esi
jne 0x402838
cmp dword [eax + ecx + 0x88], esi
jne 0x402838
mov eax, dword [ebp - 4]
inc ebx
add eax, 0x3c
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], eax
cmp ebx, dword [edx + 0x7c]
jl 0x4026e6
xor esi, esi
inc esi
mov ecx, dword [ebp + 0xc]
mov dword [ecx], ebx
test edi, edi
je 0x402848
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
push esi
pop eax
pop esi
pop ebx
push ebp
pop esp
pop ebp
ret 8
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x402838
Function at 0x402a93
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 [section..data]
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 0x409180
mov ebx, edx
mov dword [0x409164], esi
call sub.msvcrt.dll_memset
push 0x32c
push edi
push 0x408940
call sub.msvcrt.dll_memset
push 0x104
push edi
push 0x409060
call sub.msvcrt.dll_memset
add esp, 0x24
xor eax, eax
inc eax
mov edx, 0x409194
mov ecx, 0x4011c8
mov dword [0x40942c], eax
push 0x7f
call fcn.004043c1
or eax, eax
je 0x402cdc
cmp eax, 0x80
ja 0x402cdc
push edi
sub eax, eax
inc eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push eax
mov dword [0x4085cc], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 4
mov edx, 0x409a74
mov ecx, 0x4011d0
call fcn.004043c1
test eax, eax
jne 0x402b66
xor eax, eax
mov edx, 0x4b1
push eax
push 0x10
push eax
push eax
sub ecx, ecx
call fcn.004041b0
mov dword [0x409a88], 0x80070714
jmp 0x402cef
test byte [0x409a74], 0xc0
je 0x402c08
push 0x104
lea edx, [ebp - 0x108]
mov ecx, 0x4011dc
call fcn.004043c1
test eax, eax
je 0x402b44
lea eax, [ebp - 0x108]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x4085c8], eax
or eax, eax
je 0x402c08
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402c08
xor ecx, ecx
test byte [0x409a74], 0x80
je 0x402bd3
push ecx
push 0x10
push ecx
push 0x409194
mov edx, 0x54b
call fcn.004041b0
jmp 0x402bed
push 4
push 0x20
push 0
push 0x409194
mov edx, 0x524
call fcn.004041b0
cmp eax, 6
je 0x402c08
push dword [0x4085c8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x409a88], 0x800700b7
jmp 0x402cef
and dword [0x409a84], edi
mov ecx, ebx
call fcn.004059bd
or eax, eax
jne 0x402c23
mov edx, 0x520
jmp 0x402ce1
cmp byte [0x40895a], 0
je 0x402c3b
mov ecx, 0x40895a
call fcn.00402146
jmp 0x402cef
push 0xa
push 0x4011ec
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x402c57
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
cmp dword [0x4081f8], 0
je 0x402c66
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
cmp dword [0x408944], 0
je 0x402c74
sub eax, eax
inc eax
jmp 0x402cf1
mov ecx, edi
call fcn.00403497
test eax, eax
je 0x402cef
mov ax, word [0x409a80]
xor ebx, ebx
inc ebx
cmp ax, bx
je 0x402c99
cmp ax, 2
je 0x402c99
cmp ax, 3
jne 0x402cd8
test dword [0x409a74], 0x100
je 0x402cd8
test byte [0x408958], 1
jne 0x402cd8
call fcn.0040161f
test eax, eax
jne 0x402cd8
push 0x83e
push 0x547
push 0x401759
push eax
mov edx, 0x7d6
call fcn.004061f9
cmp eax, 0x83d
jne 0x402cef
mov eax, ebx
jmp 0x402cf1
mov edx, 0x4b1
sub eax, eax
xor ecx, ecx
push eax
push 0x10
push eax
push eax
call fcn.004041b0
sub eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004069ed
push ebp
pop esp
pop ebp
ret 4
Function at 0x402d09
Capabilities:
Get common file path
Set current directory

Disassembly:
push edi
pop edi
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp word [0x408958], 0
jne 0x402d54
cmp dword [0x408944], 0
jne 0x402d4b
call fcn.00404eb2
test eax, eax
jne 0x402d41
xor eax, eax
jmp 0x402e72
cmp word [0x408958], 0
jne 0x402d54
call fcn.00403794
test eax, eax
je 0x402d3a
call fcn.00404e2c
or eax, eax
je 0x402d3a
call fcn.00405299
test eax, eax
je 0x402d3a
push ebx
push esi
push edi
mov esi, 0x105
lea eax, [ebp - 0x10c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x401094
push esi
pop edx
lea ecx, [ebp - 0x10c]
call fcn.004062ff
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
pop esi
sub edi, edi
mov ebx, 0x409224
test esi, esi
je 0x402dbc
push 0x4011f8
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
or eax, eax
je 0x402dbc
push edi
push ebx
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [0x408944], edi
jne 0x402ddc
cmp dword [0x409a70], edi
jne 0x402ddc
call 0x405f05
or eax, eax
je 0x402e51
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x402e04
push edi
push 0x10
push edi
push edi
mov edx, 0x4bc
sub ecx, ecx
call fcn.004041b0
call fcn.00405f71
mov dword [0x409a88], eax
jmp 0x402e51
cmp dword [0x40894c], edi
jne 0x402e15
call fcn.00403880
or eax, eax
je 0x402e51
test byte [0x408c68], 0xc0
jne 0x402e31
mov cx, word [0x409a80]
call fcn.00402337
mov dword [0x409a7c], eax
jmp 0x402e37
mov dword [0x409a7c], edi
mov eax, dword [0x408944]
test eax, eax
jne 0x402e5a
cmp dword [0x409a70], edi
jne 0x402e5a
call fcn.00403901
test eax, eax
jne 0x402e55
sub eax, eax
jmp 0x402e6f
mov eax, dword [0x408944]
cmp word [0x408958], di
jne 0x402e6c
test eax, eax
jne 0x402e6c
call fcn.00403eac
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004069ed
mov esp, ebp
pop ebp
ret
Function at 0x403d2a
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
push esp
pop ebp
sub esp, 0x21c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
push ecx
pop esi
inc ebx
xor eax, eax
push edi
or esi, esi
je 0x403e43
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
sub edi, edi
push edi
push edi
push 0x20
push edi
push edi
push edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
or eax, eax
je 0x403dfd
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 [0x408948], edi
jne 0x403dcc
mov eax, dword [0x409a6c]
test bl, al
je 0x403dcc
test al, 2
jne 0x403dcc
push ecx
pop eax
and eax, 0xff000000
cmp eax, 0xaa000000
jne 0x403dcc
mov dword [0x409a6c], ecx
call fcn.00403e59
push dword [ebp - 0x218]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x21c]
call esi
test dword [0x409a74], 0x400
je 0x403e41
cmp dword [ebp - 0x20c], edi
jge 0x403e41
jmp 0x403e3f
call fcn.00405f71
push edi
mov dword [0x409a88], 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 esi
xor ecx, ecx
call fcn.004041b0
mov ebx, edi
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004069ed
mov esp, ebp
pop ebp
ret

Function at 0x4044d3
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push esi
push edi
sub esi, esi
mov edi, ecx
inc esi
call fcn.004062e0
test eax, eax
je 0x404537
cmp dword [0x40921c], 0
jne 0x40452b
test byte [0x408958], 1
jne 0x40452b
push 6
push 0
push 0x4031f3
push dword [0x4085c0]
mov edx, 0x7d3
mov dword [0x409444], edi
call fcn.004061f9
sub eax, 6
je 0x40452b
dec eax
je 0x40453c
sub eax, 0x832
jne 0x40452b
mov dword [0x40921c], esi
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
push esi
pop eax
pop esi
ret
xor esi, esi
jmp 0x404537

Function at 0x404671
Capabilities:
Create directory

Disassembly:
pushal
popal
push edi
mov edi, ecx
mov al, byte [edi]
test al, al
je 0x4046d6
push ebx
push esi
lea esi, [edi + 1]
xor ebx, ebx
mov cl, byte [esi]
cmp cl, 0x3a
jne 0x404695
cmp byte [edi + 2], 0x5c
jne 0x404695
lea esi, [edi + 3]
jmp 0x4046cf
cmp al, 0x5c
jne 0x4046cf
cmp cl, al
jne 0x4046cf
push 2
lea esi, [edi + 2]
pop ebx
jmp 0x4046cf
cmp byte [esi], 0x5c
jne 0x4046c6
cmp byte [esi - 1], 0x3a
je 0x4046c6
or ebx, ebx
je 0x4046b7
dec ebx
jmp 0x4046c6
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
cmp byte [esi], 0
jne 0x4046a5
pop esi
pop ebx
pop edi
ret
Function at 0x404cbc
Capabilities:
Extract resource via kernel32 functions

Disassembly:
pushfd
popfd
push ebx
push esi
sub ebx, ebx
mov esi, 0x40129c
push ebx
xor edx, edx
push esi
pop ecx
call fcn.004043c1
push 0xa
push esi
push ebx
mov dword [0x409184], 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 [0x409180], eax
or eax, eax
je 0x404e24
mov eax, dword [0x4085c0]
push edi
or eax, eax
je 0x404d30
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push ebx
push 0x842
push eax
call edi
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
push eax
call esi
push 5
push 0x841
push dword [0x4085c0]
call edi
push eax
call esi
call fcn.00404beb
test eax, eax
jne 0x404d40
mov edx, 0x4ba
jmp 0x404db7
push 0x409188
push 1
push 0x40491a
push fcn.004048c2
push 0x40482e
push 0x4047b2
push fcn.004046dd
push 0x404a0e
push 0x4049f7
call dword [sym.imp.Cabinet.dll_FDICreate]
mov edi, eax
add esp, 0x24
or edi, edi
je 0x404dab
push 0x409180
push ebx
push 0x404a23
push ebx
push 0x401091
push str.MEMCAB
push edi
call dword [sym.imp.Cabinet.dll_FDICopy]
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x404dc9
push edi
call dword [sym.imp.Cabinet.dll_FDIDestroy]
pop ecx
test eax, eax
jne 0x404dc9
mov edx, dword [0x409188]
lea edx, [edx + 0x514]
mov ecx, dword [0x4085c0]
push ebx
push 0x10
push ebx
push ebx
call fcn.004041b0
push ebx
pop esi
mov eax, dword [0x409180]
pop edi
or eax, eax
je 0x404de0
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [0x409180], ebx
or esi, esi
jne 0x404dfd
cmp dword [0x409218], ebx
jne 0x404dfd
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4f8
xor ecx, ecx
call fcn.004041b0
test byte [0x408958], 1
jne 0x404e22
test byte [0x409a74], 1
jne 0x404e22
push ebx
push esi
push 0xfa1
push dword [0x4085c0]
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, esi
pop esi
pop ebx
ret
Function at 0x404f88
Capabilities:
Delete file
Set current directory
Set file attributes

Disassembly:
pushal
popal
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [0x409220]
push edi
jmp 0x404fe0
cmp dword [0x408944], 0
jne 0x404fce
cmp dword [0x409a70], 0
jne 0x404fce
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]
push esi
pop edi
or esi, esi
jne 0x404fa7
mov eax, dword [0x408940]
pop edi
pop esi
or eax, eax
je 0x405049
cmp dword [0x408944], 0
jne 0x405049
cmp dword [0x409a70], 0
jne 0x405049
push ecx
push 0x409224
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.0040150c
test byte [0x409a74], 0x20
je 0x40502e
lea ecx, [ebp - 0x108]
call fcn.00406362
push 0x40114c
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x108]
call fcn.00402146
mov eax, dword [0x408940]
cmp word [0x409a80], 1
je 0x40505c
or eax, eax
je 0x40505c
call fcn.00401d74
mov ecx, dword [ebp - 4]
and dword [0x408940], 0
xor ecx, ebp
call fcn.004069ed
push ebp
pop esp
pop ebp
ret

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

Disassembly:
pushfd
popfd
push ebp
push esp
pop ebp
sub esp, 0x110
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
sub ebx, ebx
mov dword [ebp - 0x10c], ecx
mov edi, edx
xor esi, esi
jmp 0x4050a2
mov ebx, dword [ebp - 0x110]
push ebx
push 0x4012c8
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.004014a4
add esp, 0x10
push edi
pop ecx
inc ebx
mov dword [ebp - 0x110], ebx
mov ebx, 0x104
mov edx, ebx
push dword [ebp - 0x10c]
call fcn.00401405
lea eax, [ebp - 0x108]
push ebx
pop edx
push eax
push edi
pop ecx
call fcn.004062ff
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp eax, 0xffffffff
je 0x405148
cmp dword [ebp - 0x110], 0x190
jl 0x40509c
push edi
push 0
push 0x4012d4
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x405133
sub esi, esi
push edi
inc esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push edi
call ebx
mov ecx, dword [ebp - 4]
push esi
pop eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004069ed
push ebp
pop esp
pop ebp
ret 4
push 0
push edi
call ebx
xor esi, esi
test eax, eax
je 0x40510c
inc esi
mov dword [0x408940], esi
jmp 0x405133
Function at 0x4055c4
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
push esp
pop ebp
push ecx
push ebx
push esi
push edi
push ecx
pop edi
push edi
pop edx
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4055d4
sub edx, ecx
lea esi, [edx + 0x14]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
or ebx, ebx
jne 0x405615
sub esi, esi
mov edx, 0x4b5
push esi
push 0x10
push esi
push esi
xor ecx, ecx
call fcn.004041b0
call fcn.00405f71
mov dword [0x409a88], eax
xor eax, eax
pop edi
pop esi
pop ebx
push ebp
pop esp
pop ebp
ret
push edi
push esi
pop edx
push ebx
pop ecx
call fcn.00401405
push 0x401308
mov edx, esi
mov ecx, ebx
call fcn.004062ff
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 0x405602
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405602
test al, 0x10
je 0x405602
sub eax, eax
mov dword [0x409a88], esi
inc eax
jmp 0x40560e