joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100525ab
Capabilities:
Allocate or change rwx memory
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
mov esi, eax
push edi
mov ebx, 0x10000
cmp esi, 0x7ff80000
jbe 0x100525ce
lea eax, [esi - 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x100525d1
mov dword [ebp - 4], ebx
cmp esi, 0x80000000
jae 0x100525e4
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 8], eax
jmp 0x100525eb
mov dword [ebp - 8], 0xfff80000
mov eax, dword [0x100b0830]
mov ecx, dword [0x100b082c]
test eax, eax
jne 0x10052605
test ecx, ecx
je 0x1005261a
mov eax, ecx
mov dword [0x100b0830], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x1005261a
cmp edx, dword [ebp - 4]
jb 0x1005261a
cmp edx, dword [ebp - 8]
jbe 0x100526eb
mov eax, ecx
test ecx, ecx
jmp 0x1005263e
test eax, eax
je 0x10052639
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x10052639
cmp ecx, dword [ebp - 4]
jb 0x10052639
cmp ecx, dword [ebp - 8]
jbe 0x100526eb
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x100b0830], eax
jne 0x10052620
mov eax, esi
and eax, 0xffff
sub esi, eax
mov edi, esi
cmp esi, dword [ebp - 4]
jbe 0x10052780
lea eax, [edi - 0x70000000]
cmp eax, 0x10000000
ja 0x1005266b
mov edi, 0x6fff0000
push 0x1c
lea eax, [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10052780
cmp dword [ebp - 0x30], ebx
jne 0x1005268a
cmp dword [ebp - 0x34], ebx
jae 0x1005269d
mov edi, dword [ebp - 0x3c]
add edi, 0xffff0000
cmp edi, dword [ebp - 4]
ja 0x10052659
jmp 0x10052780
push 0x40
push 0x3000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x100b0830], eax
test eax, eax
je 0x10052780
mov ecx, dword [0x100b082c]
xor edx, edx
mov dword [eax + 4], ecx
mov dword [eax], 0x52727464
mov dword [eax + 8], edx
mov dword [0x100b082c], eax
lea ecx, [eax + 0xffe0]
mov esi, 0x7fd
mov dword [ecx + 0x18], edx
mov edx, ecx
sub ecx, 0x20
dec esi
jne 0x100526dd
mov dword [eax + 8], edx
mov esi, dword [eax + 8]
cmp esi, dword [ebp - 4]
jb 0x10052785
cmp esi, dword [ebp - 8]
ja 0x10052785
mov ecx, dword [esi + 0x18]
push 0x20
push 0xcc
push esi
mov dword [eax + 8], ecx
call fcn.10054210
add esp, 0xc
mov eax, esi
jmp 0x10052787
lea eax, [esi - 0x70000000]
cmp eax, 0x10000000
ja 0x1005272c
mov esi, 0x80010000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10052785
cmp dword [ebp - 0x14], ebx
jne 0x10052777
cmp dword [ebp - 0x18], ebx
jb 0x10052777
movzx ecx, si
test ecx, ecx
je 0x1005275b
mov eax, ebx
sub eax, ecx
sub dword [ebp - 0x18], eax
add dword [ebp - 0x24], eax
mov esi, dword [ebp - 0x24]
push 0x40
push 0x3000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x100b0830], eax
test eax, eax
jne 0x100526b9
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
lea esi, [eax + ecx]
cmp esi, dword [ebp - 8]
jb 0x1005271a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100527ad
Capabilities:
Parse pe header

Disassembly:
push 0x24
push 0x100a03d8
call fcn.10058430
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10052808
and dword [ebp - 4], 0
mov ecx, 0x5a4d
mov eax, dword [ebp - 0x30]
cmp word [eax], cx
jne 0x10052801
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10052801
cmp word [ecx + 0x14], 0
je 0x10052801
mov dword [ebp - 4], 0xfffffffe
jmp 0x1005280a
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
call fcn.10058475
ret
Function at 0x10053b60
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x100a8810]
jne 0x10053b6a
repz ret
jmp fcn.10059f5c

Function at 0x1006da91
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.10059898
and dword [ebp - 4], 0
cmp dword [0x100b1260], 0
mov ebx, eax
jne 0x1006db42
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x1006dbf3
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x1006dbf3
push eax
call fcn.10059826
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x100b1260], eax
call esi
push eax
call fcn.10059826
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x100b1264], eax
call esi
push eax
call fcn.10059826
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x100b1268], eax
call esi
push eax
call fcn.10059826
pop ecx
mov dword [0x100b1270], eax
test eax, eax
je 0x1006db42
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.10059826
pop ecx
mov dword [0x100b126c], eax
mov eax, dword [0x100b126c]
cmp eax, ebx
je 0x1006db9a
cmp dword [0x100b1270], ebx
je 0x1006db9a
push eax
call fcn.100598a1
push dword [0x100b1270]
mov esi, eax
call fcn.100598a1
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x1006db9a
test edi, edi
je 0x1006db9a
call esi
test eax, eax
je 0x1006db91
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x1006db91
test byte [ebp - 0xc], 1
jne 0x1006db9a
or dword [ebp + 0x10], 0x200000
jmp 0x1006dbd3
mov eax, dword [0x100b1264]
cmp eax, ebx
je 0x1006dbd3
push eax
call fcn.100598a1
pop ecx
test eax, eax
je 0x1006dbd3
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x1006dbd3
mov eax, dword [0x100b1268]
cmp eax, ebx
je 0x1006dbd3
push eax
call fcn.100598a1
pop ecx
test eax, eax
je 0x1006dbd3
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x100b1260]
call fcn.100598a1
pop ecx
test eax, eax
je 0x1006dbf3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x1006dbf5
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100e7546
Capabilities:
Encode data using xor

Disassembly:
lea esp, [esp + 4]
mov dword [esp], 0x34de655a
mov edi, dword [esp + 0xc]
mov dword [esp], edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0xc], edi
fidiv word [ebx + ecx*4]
mov esp, 0xc24
add byte [ecx - 0x4374dbc4], cl
and al, 0x10
add byte [eax], al
add byte [ecx + 0xc24bc], cl
add byte [eax], al
pop dword [esp + 0xc]
mov ecx, dword [esp + 0x30]
mov dword [esp], ecx
push eax
pushfd
xor eax, eax
add eax, dword [esp + 8]
add eax, 0x8a46ca3a
add eax, 0x75b935ca
popfd
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [esp + 8]
xor dword [esp + 8], eax
mov eax, dword [esp + 0x10]
push eax
mov eax, dword [esp + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x14], 4
pushfd
call 0x100e75cd
jecxz 0x100e754f
add al, 0x24
invalid
Function at 0x401084
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
lea eax, [ebp + 0x10]
push edi
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call fcn.0040b88e
lea eax, [ebp - 0x104]
xor esi, esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
add esp, 0xc
cmp dword [eax + 0x1a8], esi
je 0x4010eb
add eax, 0x84
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov edi, eax
cmp edi, esi
je 0x4010f8
lea eax, [ebp - 4]
push esi
push eax
push esi
push 1
push esi
push esi
push esi
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x4010f8
lea eax, [ebp - 0x104]
push eax
call fcn.0040b816
pop ecx
pop edi
pop esi
leave
ret

Function at 0x4011f5
Capabilities:
Initialize winsock library

Disassembly:
mov eax, 0x419dc8
call fcn.0040bcb8
sub esp, 0x1c0
push ebx
push esi
push edi
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor esi, esi
mov dword [0x422af4], eax
push esi
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
push 1
push esi
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], esi
call fcn.00403291
push esi
push esi
push esi
push 3
push 4
push esi
push esi
push 0xffffffffffffffff
push dword [ebp - 0x20]
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
push 1
mov ebx, 0x422950
push 0x14
push ebx
call fcn.00402c4f
push str.Service_started
push edi
call fcn.00401084
cmp dword [edi + 0x1a8], esi
pop ecx
pop ecx
je 0x40127c
push 4
mov ecx, edi
call fcn.004011d5
lea eax, [ebp - 0x1cc]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0x41e150
call fcn.00405f8b
pop ecx
call fcn.00405f9c
test al, al
je 0x4012d3
push 0x41e13c
call fcn.00405f8b
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
pop ecx
push esi
push esi
lea eax, [ebp - 0x3c]
push esi
push eax
call edi
test eax, eax
je 0x4012de
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push esi
push esi
lea eax, [ebp - 0x3c]
push esi
push eax
jmp 0x4012ba
push 0x41e100
call fcn.00405f8b
pop ecx
call fcn.00406009
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x41e0f4
call fcn.00405f8b
pop ecx
push ebx
call fcn.00402ce4
call dword [sym.imp.ole32.dll_CoUninitialize]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00403247
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x4014b1
Capabilities:
Delete registry value
Set registry value

Disassembly:
mov eax, 0x419de4
call fcn.0040bcb8
sub esp, 0xc
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x18], ecx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
cmp eax, ebx
jl 0x4015d0
mov ecx, dword [ebp - 0x18]
call fcn.00401767
push ebx
push 1
push 0x64
push dword [ebp - 0x18]
call fcn.004018b1
mov dword [ebp - 0x14], ebx
mov esi, 0x20006
lea ecx, [ebp - 0x14]
push esi
push str.AppID
push SysReAllocString
mov dword [ebp - 4], ebx
call fcn.00401873
mov edi, eax
cmp edi, ebx
je 0x401525
cmp dword [ebp - 0x14], ebx
je 0x4015ce
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4015ce
mov dword [ebp - 0x10], ebx
push esi
push str.6773F42E_4F45_495E_B5EF_3D2F05F1C148
push dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00401873
mov edi, eax
cmp edi, ebx
jne 0x4015b1
push str.LocalService
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp dword [ebp + 0xc], ebx
je 0x40159d
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, 0x41e1f8
push edi
call esi
inc eax
push eax
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 1
push ebx
push str.LocalService
push dword [ebp - 0x10]
call edi
mov ebx, str._Service
push ebx
call esi
inc eax
push eax
push ebx
push 1
push 0
push str.ServiceParameters
push dword [ebp - 0x10]
call edi
mov ecx, dword [ebp - 0x18]
call fcn.004016ba
xor ebx, ebx
push ebx
push dword [ebp + 8]
push dword [ebp - 0x18]
call fcn.00402d20
mov edi, eax
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp dword [ebp - 0x10], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x4015c4
push dword [ebp - 0x10]
call esi
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x14], ebx
je 0x4015ce
push dword [ebp - 0x14]
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8

Function at 0x4016ba
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
push esi
push edi
mov edi, ecx
call fcn.00401041
test eax, eax
jne 0x40175f
xor esi, esi
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
cmp ebx, esi
jne 0x4016f9
add edi, 0x84
push esi
push edi
push str.Couldnt_open_service_manager
jmp 0x401748
lea eax, [ebp - 0x104]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
push esi
push str.RPCSS
push esi
lea eax, [ebp - 0x104]
push esi
push eax
push 1
push 2
add edi, 0x84
push 0x10
push 0xf01ff
push edi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, esi
jne 0x401753
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
push edi
push str.Couldnt_create_service
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x401762
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push ebx
call esi
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401767
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.00401041
test eax, eax
je 0x4017ee
xor ebp, ebp
push 0xf003f
push ebp
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, ebp
jne 0x40179d
add esi, 0x84
push ebp
push esi
push str.Couldnt_open_service_manager
jmp 0x4017c4
lea ebx, [esi + 0x84]
push 0x10020
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, ebp
jne 0x4017c7
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
push ebx
push str.Couldnt_open_service
push ebp
jmp 0x4017fd
lea eax, [esp + 0x10]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebp, eax
call esi
push edi
call esi
test ebp, ebp
je 0x4017f3
push 1
pop eax
jmp 0x401805
push 0
push ebx
push str.Service_could_not_be_deleted
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret

Function at 0x401c26
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ebx
jne 0x401c40
xor esi, esi
jmp 0x401c6e
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0040c100
mov esi, esp
push ebx
push ebx
push edi
push esi
push 0xffffffffffffffff
push dword [ebp + 8]
mov byte [esi], bl
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 2
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 4], edi
jne 0x401ca9
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x401ca2
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x401d3e
xor esi, esi
jmp 0x401d3e
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, ebx
jne 0x401ccc
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x401cdf
xor esi, esi
jmp 0x401d35
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
cmp edi, ebx
mov dword [ebp + 8], edi
jne 0x401cf1
jmp 0x401cbc
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x401d35
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov eax, dword [ebp + 8]
cmp byte [esi + eax], bl
je 0x401d27
lea eax, [esi + 1]
add eax, 3
and al, 0xfc
call fcn.0040c100
lea eax, [esi + 1]
mov edi, esp
push eax
push dword [ebp + 8]
push edi
call fcn.0040bce0
add esp, 0xc
mov byte [edi + esi], bl
push dword [ebp + 0x14]
lea ecx, [ebp - 0xc]
push edi
call fcn.00401da5
mov esi, eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea esp, [ebp - 0x18]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x402761
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov eax, 0x419e54
call fcn.0040bcb8
sub esp, 0x114
push ebx
push esi
xor esi, esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esi
push 0x2001f
lea ecx, [ebp - 0x10]
push dword [ebp + 8]
mov dword [ebp - 4], esi
push dword [ebx]
call fcn.00401873
mov edi, eax
cmp edi, esi
je 0x4027ab
cmp dword [ebp - 0x10], esi
je 0x4027a4
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x402848
lea eax, [ebp - 0x20]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push eax
push esi
push esi
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x120]
mov dword [ebp - 0x14], 0x100
push eax
push esi
push dword [ebp - 0x10]
call edi
test eax, eax
jne 0x40281c
lea eax, [ebp - 0x120]
lea ecx, [ebp - 0x10]
push eax
call fcn.00402761
cmp eax, esi
mov dword [ebp - 0x18], eax
jne 0x402809
lea eax, [ebp - 0x20]
mov dword [ebp - 0x14], 0x100
push eax
push esi
push esi
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x120]
push eax
push esi
push dword [ebp - 0x10]
jmp 0x4027ce
cmp dword [ebp - 0x10], esi
je 0x402817
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x18]
jmp 0x402848
cmp dword [ebp - 0x10], esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x40282f
push dword [ebp - 0x10]
call edi
mov dword [ebp - 0x10], esi
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
cmp dword [ebp - 0x10], esi
mov ebx, eax
je 0x402846
push dword [ebp - 0x10]
call edi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x402859
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2014
call fcn.0040c100
push ebx
push esi
lea eax, [ebp - 0x2014]
push edi
mov esi, ecx
push eax
mov dword [ebp - 0x14], esi
call fcn.00401efe
xor edi, edi
cmp eax, edi
jl 0x402a11
lea eax, [ebp - 0xa]
push eax
lea eax, [ebp - 0x2014]
push eax
call fcn.00402a1e
pop ecx
test eax, eax
pop ecx
jne 0x4028a4
mov eax, 0x80020009
jmp 0x402a11
mov ecx, esi
call fcn.00401ed6
lea eax, [ebp - 0x1014]
mov ecx, esi
push eax
call fcn.00401efe
cmp eax, edi
jl 0x402a11
movzx eax, word [ebp - 0xa]
sub eax, 8
je 0x4029d9
sub eax, 9
je 0x40293e
dec eax
dec eax
jne 0x402a00
lea eax, [ebp - 0x1014]
test eax, eax
jne 0x4028e9
xor ebx, ebx
jmp 0x40291e
lea eax, [ebp - 0x1014]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.0040c100
mov ebx, esp
push esi
push ebx
lea eax, [ebp - 0x1014]
push 0xffffffffffffffff
push eax
push edi
push edi
mov word [ebx], di
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x10]
push eax
push edi
push edi
push ebx
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov eax, dword [ebp - 0x10]
push 4
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 4
jmp 0x4029f1
lea eax, [ebp - 0x1014]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test al, 1
mov dword [ebp - 8], eax
jne 0x40297a
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
mov eax, ebx
add eax, 3
and al, 0xfc
call fcn.0040c100
mov dword [ebp - 4], esp
push ebx
push edi
push dword [ebp - 4]
call fcn.0040c5b0
add esp, 0xc
cmp dword [ebp - 4], edi
jne 0x402984
mov eax, 0x80004005
jmp 0x402a11
cmp dword [ebp - 8], 0
jle 0x4029be
mov ecx, dword [ebp - 4]
mov eax, edi
cdq
sub eax, edx
sar eax, 1
lea esi, [eax + ecx]
mov al, byte [ebp + edi - 0x1014]
push eax
call fcn.00402aa5
pop ecx
mov ecx, edi
push 4
and ecx, 1
shl ecx, 2
mov edx, ecx
pop ecx
sub ecx, edx
shl al, cl
or byte [esi], al
inc edi
cmp edi, dword [ebp - 8]
jl 0x40298a
mov eax, dword [ebp + 8]
push ebx
push dword [ebp - 4]
mov eax, dword [eax]
push 3
push 0
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
xor edi, edi
jmp 0x402a00
lea eax, [ebp - 0x1014]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x1014]
push eax
push 1
mov eax, dword [ebp + 8]
push edi
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp + 0x10]
mov ecx, dword [ebp - 0x14]
call fcn.00401efe
cmp eax, edi
jl 0x402a11
xor eax, eax
lea esp, [ebp - 0x2020]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x403802
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
push esi
push edi
push 0xd
pop ecx
mov esi, str.C:Program_FilesWindows_NTAccessorieslibwin32.dll
lea edi, [ebp - 0x114]
push 0x32
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
pop ecx
xor eax, eax
lea edi, [ebp - 0xdf]
push 0x41e3f4
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x114]
push eax
call fcn.0040cbba
mov esi, eax
pop ecx
test esi, esi
pop ecx
mov ebx, str._04x
je 0x4038aa
mov al, byte [0x423524]
lea edi, [ebp - 0xf]
mov byte [ebp - 0x10], al
xor eax, eax
and dword [ebp - 4], 0
push 0x423524
push dword [ebp + 8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
call fcn.0040c930
pop ecx
pop ecx
push esi
push 4
lea eax, [ebp - 4]
push 1
push eax
call fcn.0040ca72
add esp, 0x10
cmp eax, 4
jne 0x4038a3
push dword [ebp - 4]
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.0040ca20
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call fcn.0040c940
add esp, 0x14
jmp 0x40386f
push esi
call fcn.0040c8ab
pop ecx
push dword [ebp + 8]
call fcn.0040c830
cmp eax, 0x40
pop ecx
jne 0x4038bf
mov al, 1
jmp 0x403982
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
push str.C:Program_Files
call esi
push 0
push str.C:Program_FilesWindows_NT
call esi
push 0
push str.C:Program_FilesWindows_NTAccessories
call esi
lea eax, [ebp - 0x114]
push 0x41e390
push eax
call fcn.0040cbba
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
pop ecx
je 0x403973
call fcn.0040c802
mov esi, 0xffff
lea edi, [ebp - 0xf]
cdq
mov ecx, esi
push 0x423524
idiv ecx
mov al, byte [0x423524]
push dword [ebp + 8]
mov byte [ebp - 0x10], al
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
mov dword [ebp - 4], edx
call fcn.0040c930
pop ecx
pop ecx
push 0x10
pop edi
call fcn.0040c802
cdq
mov ecx, esi
push dword [ebp - 0x14]
idiv ecx
push 4
lea eax, [ebp - 4]
push 1
push eax
mov dword [ebp - 4], edx
call fcn.0040c6bc
push dword [ebp - 4]
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.0040ca20
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call fcn.0040c940
add esp, 0x24
dec edi
jne 0x40392e
push dword [ebp - 0x14]
call fcn.0040c8ab
pop ecx
push dword [ebp + 8]
call fcn.0040c830
cmp eax, 0x40
pop ecx
sete al
pop edi
pop esi
pop ebx
leave
ret