joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407b48
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040339c
xor eax, eax
push ebp
push 0x407cca
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
push 0x407ce0
call sub.kernel32.dll_LoadLibraryA
mov ebx, eax
test ebx, ebx
je 0x407cb4
push 0xe
push esi
push ebx
call sub.kernel32.dll_FindResourceA
mov esi, eax
test esi, esi
jne 0x407ba1
push ebx
call sub.kernel32.dll_FreeLibrary_1
jmp 0x407cb4
push esi
push ebx
call sub.kernel32.dll_LoadResource
test eax, eax
jne 0x407bb7
push ebx
call sub.kernel32.dll_FreeLibrary_1
jmp 0x407cb4
push eax
call sub.kernel32.dll_LockResource
mov dword [ebp - 0x10], eax
push 0
mov eax, dword [ebp - 4]
call fcn.004033ac
push eax
call sub.kernel32.dll_BeginUpdateResourceA
mov edi, eax
test edi, edi
jne 0x407be1
push ebx
call sub.kernel32.dll_FreeLibrary_1
jmp 0x407cb4
push esi
push ebx
call sub.kernel32.dll_SizeofResource
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0
push 1
push 0xe
push edi
call sub.kernel32.dll_UpdateResourceA
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 9], al
push 0
push edi
call sub.kernel32.dll_EndUpdateResourceA
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
sub edx, eax
jl 0x407caa
inc edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
push 3
mov eax, dword [ebp - 0x14]
push eax
push ebx
call sub.kernel32.dll_FindResourceA
mov esi, eax
test esi, esi
jne 0x407c39
push ebx
call sub.kernel32.dll_FreeLibrary_1
jmp 0x407cb4
push esi
push ebx
call sub.kernel32.dll_LoadResource
test eax, eax
jne 0x407c4c
push ebx
call sub.kernel32.dll_FreeLibrary_1
jmp 0x407cb4
push eax
call sub.kernel32.dll_LockResource
mov dword [ebp - 0x10], eax
push 0
mov eax, dword [ebp - 4]
call fcn.004033ac
push eax
call sub.kernel32.dll_BeginUpdateResourceA
mov edi, eax
test edi, edi
jne 0x407c73
push ebx
call sub.kernel32.dll_FreeLibrary_1
jmp 0x407cb4
push esi
push ebx
call sub.kernel32.dll_SizeofResource
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 0x14]
push eax
push 3
push edi
call sub.kernel32.dll_UpdateResourceA
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 9], al
push 0
push edi
call sub.kernel32.dll_EndUpdateResourceA
inc dword [ebp - 0x14]
dec dword [ebp - 0x18]
jne 0x407c1f
push ebx
call sub.kernel32.dll_FreeLibrary_1
mov byte [ebp - 9], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407cd1
lea eax, [ebp - 4]
call fcn.00403070
ret
Function at 0x407cec
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
xor edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040339c
xor eax, eax
push ebp
push 0x407d8a
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 4]
call fcn.00403108
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x407d98
push 0x80000002
call sub.advapi32.dll_RegCreateKeyExA
test eax, eax
jne 0x407d6c
mov eax, dword [ebp - 0x10]
call fcn.004031e8
inc eax
push eax
mov eax, dword [ebp - 0x10]
push eax
push 1
push 0
push 0x407dc8
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegSetValueExA
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407d91
lea eax, [ebp - 0x10]
call fcn.00403070
lea eax, [ebp - 4]
call fcn.00403070
ret

Function at 0x407dd8
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040339c
xor eax, eax
push ebp
push 0x407e2c
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
push 0x407e38
push 0x407e38
mov eax, dword [ebp - 4]
call fcn.004033ac
push eax
push 0x407e3c
push 0
call sub.shell32.dll_ShellExecuteA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407e33
lea eax, [ebp - 4]
call fcn.00403070
ret
Function at 0x409bdc
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push ebx
push esi
push edi
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x409d5c
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebx + 0x10]
push eax
lea eax, [ebp - 4]
mov ecx, 0x409d74
mov edx, edi
call fcn.00403234
mov eax, dword [ebp - 4]
call fcn.004033ac
push eax
call sub.kernel32.dll_FindFirstFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x409d41
cmp byte [ebx + 0x3c], 0x2e
je 0x409d23
test byte [ebx + 0x10], 0x10
je 0x409c9b
cmp byte [ebx + 0x15a], 0
jbe 0x409c59
lea eax, [ebp - 4]
lea edx, [ebx + 0x3c]
mov ecx, 0x104
call fcn.004031d0
mov ecx, dword [ebp - 4]
mov edx, edi
mov eax, ebx
call fcn.00409a70
cmp byte [ebx + 0x158], 0
jne 0x409d23
push edi
lea eax, [ebp - 8]
lea edx, [ebx + 0x3c]
mov ecx, 0x104
call fcn.004031d0
push dword [ebp - 8]
push 0x409d80
lea eax, [ebp - 4]
mov edx, 3
call fcn.004032a8
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00409bdc
jmp 0x409d23
lea eax, [ebp - 8]
lea edx, [ebx + 0x3c]
mov ecx, 0x104
call fcn.004031d0
mov eax, dword [ebp - 8]
lea edx, [ebp - 4]
call fcn.004056d0
mov eax, dword [ebp - 4]
mov edx, dword [ebx + 0xc]
call fcn.0040991c
test al, al
je 0x409cef
inc dword [ebx + 4]
cmp byte [ebx + 0x15a], 1
je 0x409d23
lea eax, [ebp - 4]
lea edx, [ebx + 0x3c]
mov ecx, 0x104
call fcn.004031d0
mov ecx, dword [ebp - 4]
mov edx, edi
mov eax, ebx
call fcn.00409a70
jmp 0x409d23
push edi
push 0x409d80
lea eax, [ebp - 8]
lea edx, [ebx + 0x3c]
mov ecx, 0x104
call fcn.004031d0
push dword [ebp - 8]
lea eax, [ebp - 4]
mov edx, 3
call fcn.004032a8
mov edx, dword [ebp - 4]
lea eax, [ebx + 0x18c]
call fcn.00407028
cmp byte [ebx + 8], 0
jne 0x409d3b
lea eax, [ebx + 0x10]
push eax
push esi
call sub.kernel32.dll_FindNextFileA
test eax, eax
jne 0x409c24
push esi
call sub.kernel32.dll_FindClose
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409d63
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403094
ret
Function at 0x401048
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [eax - 1]
cmp ecx, 0x100
mov dword [ebp - 8], eax
ja 0x4011c9
cmp byte [eax + edi - 1], 0x5c
je 0x40107f
mov byte [eax + edi], 0x5c
inc eax
mov dword [ebp - 8], eax
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea esi, [eax + edi]
lea eax, [ebp - 0x148]
push eax
push edi
mov byte [esi], 0x2a
mov byte [esi + 1], 0
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40111c
test byte [ebp - 0x148], 0x10
je 0x4010ff
push 0x405114
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4010ff
push 0x405118
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4010ff
mov eax, 0x104
sub eax, dword [ebp - 8]
push eax
lea eax, [ebp - 0x11c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push dword [ebp + 0x14]
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00401048
add esp, 0x10
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4010a1
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x148]
push eax
push edi
mov byte [esi], 0x2a
mov byte [esi + 1], 0
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4011a9
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
test byte [ebp - 0x148], 0x10
jne 0x40118c
mov eax, 0x104
sub eax, dword [ebp - 8]
push eax
lea eax, [ebp - 0x11c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push edi
call ebx
test eax, eax
jne 0x401175
cmp dword [ebp + 8], eax
jne 0x401175
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call ebx
xor ecx, ecx
cmp dword [ebp + 0x14], ecx
je 0x40118c
cmp eax, ecx
jne 0x40118c
cmp dword [ebp + 0xc], ecx
je 0x40118c
push 4
push ecx
push edi
call dword [ebp + 0x14]
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40113b
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
mov byte [esi - 1], 0
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x4011c9
cmp dword [ebp + 0x14], eax
je 0x4011c9
cmp dword [ebp + 0xc], eax
je 0x4011c9
push 4
push eax
push edi
call dword [ebp + 0x14]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4011ce
Capabilities:
Delete file

Disassembly:
push ebx
push esi
push str.MoveFileExA
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
mov ebx, eax
call esi
test eax, eax
jne 0x401212
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call esi
test eax, eax
jne 0x401212
test ebx, ebx
je 0x401212
push 4
push eax
push edi
call ebx
pop esi
pop ebx
ret
Function at 0x401257
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x453c
call fcn.00404000
push ebx
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x13b]
push ebx
push eax
mov byte [ebp - 0x13c], bl
call fcn.00403610
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x13c]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x18], 0x104
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], 0x3fff
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
cmp dword [ebp - 8], ebx
je 0x40138c
mov dword [ebp - 4], ebx
jbe 0x40138c
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x453c]
push eax
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x3fff
push dword [ebp + 8]
mov byte [ebp - 0x453c], bl
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x40137d
push dword [ebp + 0xc]
lea eax, [ebp - 0x453c]
push eax
call fcn.00403580
test eax, eax
pop ecx
pop ecx
jne 0x401391
push 0x3ff
lea eax, [ebp - 0x53b]
push ebx
push eax
mov dword [ebp - 0x1c], 1
mov byte [ebp - 0x53c], bl
call fcn.00403610
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x53c]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
lea eax, [ebp - 0x453c]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x14], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40137d
push dword [ebp + 0xc]
lea eax, [ebp - 0x53c]
push eax
call fcn.00403580
test eax, eax
pop ecx
pop ecx
jne 0x401391
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jb 0x4012da
xor eax, eax
pop ebx
leave
ret
xor eax, eax
inc eax
jmp 0x40138e
Function at 0x401396
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
and dword [ebp - 8], 0
push ebx
push esi
push edi
push str.IsWow64Process
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4013d0
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
neg eax
sbb eax, eax
mov ebx, 0x100
and eax, ebx
mov edi, 0x20019
or eax, edi
push eax
push 0
push str.SYSTEMCurrentControlSetControlSession_Manager
push 0x80000002
call esi
test eax, eax
jne 0x40147b
push 0x3ff
push eax
mov byte [ebp - 0x414], al
lea eax, [ebp - 0x413]
push eax
mov dword [ebp - 0x14], 7
call fcn.00403610
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push str.PendingFileRenameOperations
push dword [ebp - 4]
mov dword [ebp - 0xc], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x10], 0
jne 0x40147b
push dword [ebp + 8]
lea eax, [ebp - 0x414]
push dword [ebp - 0xc]
call fcn.00401215
test eax, eax
pop ecx
pop ecx
je 0x40147b
xor eax, eax
inc eax
jmp 0x4014fd
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
neg eax
sbb eax, eax
and eax, ebx
or eax, edi
push eax
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call esi
test eax, eax
jne 0x4014bf
push dword [ebp + 8]
push dword [ebp - 4]
call fcn.00401257
test eax, eax
pop ecx
pop ecx
push dword [ebp - 4]
je 0x4014b9
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x401473
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
neg eax
sbb eax, eax
and eax, ebx
or eax, edi
push eax
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
push 0x80000001
call esi
test eax, eax
jne 0x4014fb
push dword [ebp + 8]
push dword [ebp - 4]
call fcn.00401257
test eax, eax
pop ecx
pop ecx
push dword [ebp - 4]
jne 0x4014b1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401502
Capabilities:
Create directory

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov esi, eax
push edi
push esi
mov dword [esp + 0x14], 1
call fcn.004034f0
add eax, esi
cmp byte [eax - 1], 0x5c
pop ecx
je 0x40152b
mov byte [eax], 0x5c
mov byte [eax + 1], 0
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebx, str.LMIR
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
call fcn.004034f0
mov edi, eax
cmp edi, 4
pop ecx
jbe 0x401551
push 4
pop edi
push esi
call fcn.004034f0
add edi, eax
pop ecx
lea esi, [edi + ebp]
push dword [esp + 0x10]
push str._04X.tmp
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
inc dword [esp + 0x1c]
push ebx
call fcn.004034f0
mov ecx, esi
sub ecx, eax
push ecx
call fcn.00401396
add esp, 0x14
test eax, eax
jne 0x4015a1
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4015b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4015ab
cmp dword [esp + 0x10], 0xffff
jl 0x40155d
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
inc eax
jmp 0x4015ad

Function at 0x4015b8
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push str.SHGetSpecialFolderPathA
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x4015da
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop ebp
ret
push 0
push 0x1c
push edi
push 0
call eax
test eax, eax
je 0x4015cd
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x405208
push edi
call esi
push str.Applet
push edi
call esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
pop esi
jne 0x401619
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4015cd
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
call fcn.004034f0
pop ecx
pop ebp
ret
Function at 0x40162b
Capabilities:
Get common file path
Set current directory

Disassembly:
sub esp, 0x110
cmp dword [esi], 2
push ebp
push edi
jge 0x401710
mov ebp, 0x104
cmp dword [esi], 0
mov eax, dword [esp + 0x11c]
mov byte [ebx], 0
mov byte [eax], 0
jne 0x401679
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x40166f
push eax
mov edi, ebx
call fcn.004015b8
test eax, eax
pop ecx
jne 0x401685
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp 0x401681
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x4016fc
cmp eax, 0x103
ja 0x4016fc
push dword [esp + 0x11c]
mov eax, ebx
call fcn.00401502
test eax, eax
pop ecx
jne 0x4016a4
push 2
pop eax
jmp 0x4016ff
push dword [esp + 0x11c]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call edi
test eax, eax
jne 0x40170c
push ebx
call edi
push str.MoveFileExA
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebp
push dword [esp + 0x120]
mov edi, eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push edi
lea eax, [esp + 0x14]
push eax
push 1
push 0
call fcn.00401048
add esp, 0x10
push 3
jmp 0x4016a1
xor eax, eax
inc eax
inc dword [esi]
cmp dword [esi], 2
jl 0x401641
jmp 0x401714
xor eax, eax
jmp 0x401714
mov eax, dword [esp + 0xc]
pop edi
pop ebp
add esp, 0x110
ret
Function at 0x401a28
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
xor eax, eax
cmp byte [esi], bl
push edi
setne al
push ebx
push 0x80
mov word [ebp - 4], 0x20
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push 0x40000000
push str.params.txt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x401ab8
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
jbe 0x401ab1
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 4]
push eax
push edi
call esi
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push dword [ebp + 8]
push edi
call esi
push ebx
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 4]
push eax
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
push esi
push edi
xor edi, edi
cmp dword [esp + 0xc], edi
mov esi, str.logo.bmp
je 0x401ae0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401ae0
xor eax, eax
inc eax
jmp 0x401b6e
push 0xa
push 0x2711
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
mov dword [0x406394], eax
je 0x401afe
call fcn.0040179f
jmp 0x401b00
xor eax, eax
cmp eax, edi
jne 0x401b08
xor eax, eax
jmp 0x401b6e
mov ecx, dword [0x4063a0]
cmp ecx, 0x36
mov eax, dword [0x40639c]
jb 0x401b58
cmp word [eax], 0x4d42
jne 0x401b58
cmp dword [eax + 2], ecx
jne 0x401b58
mov ecx, dword [eax + 0xe]
cmp ecx, 0x28
je 0x401b36
cmp ecx, 0x6c
je 0x401b36
cmp ecx, 0x7c
jne 0x401b58
cmp dword [eax + 0x12], 0x4e
jne 0x401b58
mov eax, dword [eax + 0x16]
cmp eax, 0x20
je 0x401b49
cmp eax, 0xffffffe0
jne 0x401b58
push 1
push edi
push esi
push edi
call fcn.00401811
add esp, 0x10
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.004017e4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
ret

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

Disassembly:
push esi
push edi
xor edi, edi
cmp dword [esp + 0xc], edi
mov esi, str.rescue.ico
je 0x401b91
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401b91
xor eax, eax
inc eax
jmp 0x401bda
push 0xa
push 0x2716
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
mov dword [0x406394], eax
je 0x401baf
call fcn.0040179f
jmp 0x401bb1
xor eax, eax
cmp eax, edi
je 0x401bd8
push 1
push edi
push esi
push edi
call fcn.00401811
add esp, 0x10
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.004017e4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
ret
Function at 0x402d8a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x624
push ebx
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [ebp - 4], ebx
call dword [0x4063a4]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x402db5
xor eax, eax
inc eax
jmp 0x402e98
push esi
push edi
lea eax, [ebp - 0x110]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x208
lea eax, [ebp - 0x318]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x110]
push eax
push 0x406600
lea eax, [ebp - 0x318]
push eax
lea eax, [ebp - 0x624]
push str.__s___service__sid___s___wd___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
mov edi, 0xf01ff
push edi
mov esi, 0x406500
push esi
push dword [ebp - 8]
call dword [0x4063a8]
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x402e4d
push ebx
push ebx
push 0x405614
push ebx
push ebx
lea eax, [ebp - 0x624]
push eax
push 1
push 3
push 0x10
push edi
push 0x4063e0
push esi
push dword [ebp - 8]
call dword [0x4063ac]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x402e8a
push ebx
push ebx
push dword [ebp - 0xc]
call dword [0x4063b0]
test eax, eax
jne 0x402e81
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x402e7a
xor ecx, ecx
cmp eax, 0x420
setne cl
lea ecx, [ecx + ecx + 2]
mov dword [ebp - 4], ecx
jmp 0x402e81
mov dword [ebp - 4], 3
push dword [ebp - 0xc]
call dword [0x4063b8]
push dword [ebp - 8]
call dword [0x4063b8]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x402fe1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00404000
cmp dword [ebp + 8], 0x1c
push ebx
push edi
lea edi, [esi + 0x10]
jb 0x4030c8
cmp dword [esi], 0x80000001
jne 0x4030c8
and dword [ebp - 4], 0
cmp dword [esi + 4], 0
jbe 0x4030bc
mov eax, dword [edi]
mov edx, dword [ebp + 8]
mov ecx, eax
jmp 0x403027
cmp byte [ecx + esi], 0
je 0x40302e
inc ecx
cmp edx, ecx
mov dword [ebp - 8], ecx
ja 0x403020
mov ebx, dword [edi + 4]
add ebx, dword [edi + 8]
cmp edx, ebx
jb 0x4030c8
cmp edx, ecx
je 0x4030c8
add eax, esi
push eax
lea eax, [ebp - 0x1008]
push eax
mov byte [ebp - 0x1008], 0
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0x8000080
push 2
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x1008]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4030c8
push 0
lea eax, [ebp - 8]
push eax
push dword [edi + 8]
mov eax, dword [edi + 4]
add eax, esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4030c1
mov eax, dword [ebp - 8]
cmp eax, dword [edi + 8]
jne 0x4030c1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 0xc
cmp eax, dword [esi + 4]
jb 0x403017
xor eax, eax
inc eax
jmp 0x4030d2
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop ebx
leave
ret
Function at 0x4033f5
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
mov al, byte [esi]
cmp al, 0x22
jne 0x40341b
cmp al, 0x22
je 0x40342b
inc esi
mov al, byte [esi]
test al, al
jne 0x40340a
cmp al, 0x22
jne 0x40342c
jmp 0x40342b
cmp al, 0x20
jle 0x40342c
inc esi
cmp byte [esi], 0x20
jg 0x40341f
jmp 0x40342c
cmp al, 0x20
jg 0x403432
inc esi
mov al, byte [esi]
test al, al
jne 0x403427
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004034a0
push 0x406004
push section..data
call fcn.00403486
test byte [ebp - 0x18], 1
pop ecx
pop ecx
je 0x403462
movzx eax, word [ebp - 0x14]
jmp 0x403465
push 0xa
pop eax
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov esi, eax
call fcn.004034b8
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40368a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x406010]
jne 0x403694
repz ret
jmp fcn.00403868