joyce8/EMBER2024-capa huggingface dataset:
Function at 0x409730
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4143d0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], 0
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x40976c
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esi + 4]
call sub.MFC42.DLL_CString::operator
mov ecx, esi
call fcn.004099f0
lea ecx, [esp + 0xc]
call fcn.00412f62
lea edx, [esi + 4]
lea ecx, [esp + 0xc]
push edx
mov byte [esp + 0x30], 1
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x1c]
call fcn.004065e0
push ecx
lea eax, [esp + 0x10]
mov ecx, esp
mov dword [esp + 0x14], esp
push eax
mov byte [esp + 0x34], 2
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x20]
call fcn.00406670
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0x28]
push eax
push ecx
mov ecx, dword [esi + 0x2c]
push ecx
push edx
mov edx, dword [esi + 0x24]
mov ecx, esi
push edx
call fcn.00409900
push str.scroll
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esi + 0x3c]
mov bl, 3
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str.colornew
mov byte [esp + 0x38], bl
call sub.MFC42.DLL_CString::CString_1
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
mov byte [esp + 0x3c], 4
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x28]
mov byte [esp + 0x38], bl
call fcn.00406850
mov eax, dword [esi + 0x40]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.colorold
call sub.MFC42.DLL_CString::CString_1
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
mov byte [esp + 0x3c], 5
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x28]
mov byte [esp + 0x38], bl
call fcn.00406850
push str.agent
lea ecx, [esp + 0xc]
call fcn.00412f38
add esi, 0x38
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push esi
call sub.MFC42.DLL_CString::CString_2
push ecx
mov byte [esp + 0x34], 6
mov ecx, esp
mov dword [esp + 0x18], esp
push str.name
call sub.MFC42.DLL_CString::CString_1
push ecx
lea eax, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
mov byte [esp + 0x3c], 7
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x28]
mov byte [esp + 0x38], bl
call fcn.004067e0
lea ecx, [esp + 8]
mov byte [esp + 0x2c], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2c], 1
call fcn.00406660
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x24]
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x28
ret 4
Function at 0x409900
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
lea eax, [esp + 4]
push edi
push eax
push str.SoftwarePig3
push closesocket
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4099e5
mov edx, dword [esp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
push eax
push str.ProxyType
push edx
call esi
test eax, eax
jne 0x4099e5
mov edx, dword [esp + 0x14]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x18]
push str.ProxyIP
push eax
call esi
test eax, eax
jne 0x4099e5
mov edx, dword [esp + 8]
lea ecx, [esp + 0x18]
push 4
push ecx
push 4
push eax
push str.ProxyPort
push edx
call esi
test eax, eax
jne 0x4099e5
mov edx, dword [esp + 0x1c]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x18]
push str.ProxyUsername
push eax
call esi
test eax, eax
jne 0x4099e5
mov edx, dword [esp + 0x20]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0xc]
push edx
push 1
push eax
push str.ProxyPassword
push ecx
call esi
test eax, eax
jne 0x4099e5
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
pop ecx
ret 0x14
pop edi
xor eax, eax
pop esi
pop ecx
ret 0x14

Function at 0x40a290
Capabilities:
Create thread
Resume thread

Disassembly:
sub esp, 8
push esi
mov esi, ecx
mov eax, dword [esi + 0x78]
test eax, eax
je 0x40a2d1
call fcn.0040aef0
test eax, eax
je 0x40a2d8
lea eax, [esp + 8]
push eax
push 4
push esi
push 0x40a7d0
push 0
push 0
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
mov dword [esi + 0x94], eax
test eax, eax
je 0x40a2d1
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
xor eax, eax
pop esi
add esp, 8
ret
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x40a2d1
mov ecx, dword [eax]
lea edx, [esp + 8]
push edi
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [esi + 0x9c]
lea edx, [esp + 8]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ecx, dword [esp + 8]
push 0
mov edi, ecx
mov eax, dword [esi + 0x9c]
neg edi
push edi
mov edi, dword [esp + 0x14]
push edi
push ecx
mov ecx, dword [esi + 0x54]
mov edx, dword [eax]
push 0
push ecx
mov ecx, dword [esi + 0x50]
push ecx
mov ecx, dword [esi + 0x7c]
push 0
push 0
push ecx
push eax
call dword [edx + 0x20]
test eax, eax
pop edi
jne 0x40a2d1
mov edx, dword [esi + 0x20]
push eax
push eax
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov eax, 1
pop esi
add esp, 8
ret
Function at 0x40a350
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], ecx
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, dword [eax + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x40a40f
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 0xc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x40a40f
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 0xc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
push ebp
push 0x22
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x40a40f
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x40a408
test edi, edi
je 0x40a408
mov ecx, ebp
mov esi, eax
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [esp + 0x10]
push ebp
push ebx
call fcn.00409be0
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8

Function at 0x40ac30
Capabilities:
Print debug messages
Terminate thread

Disassembly:
sub esp, 0x64
push ebx
push esi
mov esi, ecx
mov ebx, 1
mov dword [esi + 0x70], 0
mov dword [esi + 0x74], ebx
mov eax, dword [esi + 0x98]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x94]
test eax, eax
je 0x40acc8
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x94]
push 0x1388
push ecx
call edi
test eax, eax
je 0x40acb0
mov edx, ebx
inc ebx
cmp edx, 3
jl 0x40ac64
test eax, eax
je 0x40acb0
push eax
lea eax, [esp + 0x10]
push str.thread_doesnt_exit__rs___d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [esi + 0x94]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi + 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x94], 0
pop edi
mov ecx, dword [esi + 0x98]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [esi + 0x74], 0
pop esi
pop ebx
add esp, 0x64
ret
Function at 0x40b390
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
lea eax, [esp]
push esi
push eax
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x40b3ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
pop esi
add esp, 0xc
ret
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 4]
lea ecx, [esp + 8]
lea edx, [esp + 0xc]
push ecx
push esi
push edx
push 0
push str.setupver
push eax
mov dword [esp + 0x20], 0x514
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40b3fc
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esi], 0
xor eax, eax
pop esi
add esp, 0xc
ret
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop esi
add esp, 0xc
ret

Function at 0x40b9c0
Capabilities:
Set registry value

Disassembly:
sub esp, 0x10c
push esi
mov esi, ecx
mov dword [esp + 8], esi
mov eax, dword [esi + 0x120]
cmp eax, 2
je 0x40bad8
cmp eax, 1
je 0x40bad8
lea eax, [esp + 4]
mov dword [esp + 4], 0
push eax
push str.SoftwarePig3
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40bad1
push ebp
push edi
mov ecx, 0x40
lea edi, [esp + 0x15]
mov byte [esp + 0x14], al
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x14]
push str.PigIm.zhongsou.com
push ecx
stosb byte es:[edi], al
call esi
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [esp + 0x14]
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x1c]
push str.JabberServerIp
push eax
call ebp
lea ecx, [esp + 0x14]
push str.PigUserReg.zhongsou.com
push ecx
call esi
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x14]
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x1c]
push str.PigRegisterHostIP
push eax
call ebp
lea ecx, [esp + 0x14]
push str.PigPic.zhongsou.com
push ecx
call esi
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x14]
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x1c]
push str.PigVerifyHostIP
push eax
call ebp
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x10]
pop edi
pop ebp
mov ecx, esi
call sub.MFC42.DLL_CDialog::OnCancel
pop esi
add esp, 0x10c
ret
Function at 0x40bc50
Capabilities:
Delete file
Set file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x104
lea edx, [esp]
push eax
push edx
call fcn.0040dba0
test eax, eax
je 0x40bcfc
push ebx
push esi
push edi
mov edi, 0x419264
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0xc]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x118]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [esp + 0x11c]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
test al, al
pop ebx
je 0x40bd07
lea eax, [esp]
push eax
call fcn.00406a70
add esp, 4
test eax, eax
je 0x40bd37
lea ecx, [esp]
push ecx
call fcn.00406c20
add esp, 4
test eax, eax
jne 0x40bd37
xor eax, eax
add esp, 0x104
ret 0xc
lea edx, [esp]
push edx
call fcn.00406bf0
add esp, 4
test al, al
je 0x40bd37
lea eax, [esp]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x40bcfc
mov eax, 1
add esp, 0x104
ret 0xc
Function at 0x40cf60
Capabilities:
Delete file
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4146ab
push eax
mov eax, 0x1520
mov dword fs:[0], esp
call fcn.004133a0
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 0x138]
mov ecx, dword [eax - 8]
mov dl, byte [eax + ecx - 1]
cmp dl, 0x5c
je 0x40cfa9
cmp dl, 0x2f
je 0x40cfa9
push eax
lea ecx, [esp + 0x18]
push 0x41a210
push ecx
jmp 0x40cfba
mov edx, dword [ebp + 0x138]
lea eax, [esp + 0x14]
push edx
push 0x4198d0
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
mov al, byte [0x41aa84]
add esp, 0xc
test al, al
jne 0x40cfd8
lea ecx, [esp + 0x14]
push ecx
mov ecx, ebp
call fcn.0040e6a0
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 3
jbe 0x40d000
lea edx, [esp + 0x14]
push edx
call fcn.00406b50
add esp, 4
test eax, eax
je 0x40d160
lea eax, [esp + 0x10]
push eax
push 0x41a20c
push 0x89
push 0
call fcn.00406ef0
mov ebx, eax
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
lea edx, [esp + 0x414]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x414], 0
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x414]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str.setup.tmp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 2
mov ecx, edx
push eax
push eax
and ecx, 3
lea eax, [esp + 0x428]
push 0xc0000000
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
or edi, 0xffffffff
cmp esi, edi
jne 0x40d0a9
xor eax, eax
jmp 0x40d160
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x10]
push 0
push ecx
push edx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d160
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x928]
call fcn.00408300
mov eax, dword [ebp + 0x188]
mov ecx, dword [esp + 0x1540]
add ebp, 0x6a8
push eax
push ebp
lea edx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x420]
push edx
push eax
lea ecx, [esp + 0x93c]
mov dword [esp + 0x154c], 0
call fcn.00408370
test eax, eax
je 0x40d12d
lea ecx, [esp + 0x928]
mov dword [esp + 0x1538], edi
call fcn.00408360
xor eax, eax
jmp 0x40d160
lea ecx, [esp + 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
mov dword [esp + 0x1538], edi
lea ecx, [esp + 0x928]
jne 0x40d156
call fcn.00408360
xor eax, eax
jmp 0x40d160
call fcn.00408360
mov eax, 1
mov ecx, dword [esp + 0x1530]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x152c
ret 4
Function at 0x40d3a0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0xc04
mov eax, dword [esp + 0xc10]
push ebx
push ebp
push esi
test eax, eax
push edi
mov ebx, ecx
mov dword [esp + 0x10], 0
jle 0x40d500
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [esp + 0xc18]
lea ecx, [esp + 0x414]
push eax
push 0x400
push ecx
mov byte [esp + 0x420], 0
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
lea edx, [esp + 0x414]
mov ecx, ebx
push edx
call fcn.0040d900
mov ecx, dword [esp + 0xc1c]
lea eax, [esp + 0x414]
push eax
push ecx
lea edx, [esp + 0x1c]
push str._s_s
push edx
call ebp
lea eax, [esp + 0x24]
push 0x2e
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
mov esi, eax
add esp, 0x18
test esi, esi
je 0x40d46d
inc esi
push esi
call dword [sym.imp.MSVCRT.dll__strlwr]
add esp, 4
mov eax, 0x41a278
mov dl, byte [esi]
mov cl, dl
cmp dl, byte [eax]
jne 0x40d464
test cl, cl
je 0x40d460
mov dl, byte [esi + 1]
mov cl, dl
cmp dl, byte [eax + 1]
jne 0x40d464
add esi, 2
add eax, 2
test cl, cl
jne 0x40d440
xor eax, eax
jmp 0x40d469
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40d49f
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x40d512
push str.DllRegisterServer
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40d526
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x14]
push ecx
push 2
lea ecx, [ebx + 0x6a8]
call fcn.00412620
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x814]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
push edx
lea eax, [esp + 0x818]
push str.regsvr32___s___s
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x814]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc20]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x40d3c9
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc04
ret 0xc
call fcn.00406f40
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc04
ret 0xc
call fcn.00406f40
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc04
ret 0xc
Function at 0x40da70
Capabilities:
Create directory

Disassembly:
sub esp, 0x51c
push ebx
mov ebx, ecx
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jl 0x40db84
lea eax, [esp + 4]
push eax
push 0x416500
push 1
push 0
push 0x4164f0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40db84
mov eax, dword [esp + 4]
lea edx, [esp + 8]
push edx
push 0x416520
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jl 0x40db84
lea eax, [esp + 0xc]
push 2
push eax
mov ecx, ebx
mov byte [esp + 0x14], 0
call fcn.0040dba0
test eax, eax
je 0x40db84
push ebp
push esi
push edi
mov edi, 0x41a324
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x18]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push eax
and ecx, 3
lea eax, [esp + 0x1c]
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push 0x41a31c
push 2
push str.pig.exe
push ecx
push edx
mov ecx, ebx
call fcn.0040dc30
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push 0x41a31c
push 2
push str.readme.txt
push eax
push ecx
mov ecx, ebx
call fcn.0040dc30
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
push 0x41a31c
push 2
push str.unin.exe
push edx
push eax
mov ecx, ebx
call fcn.0040dc30
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x51c
ret
call fcn.00406f40
xor eax, eax
pop ebx
add esp, 0x51c
ret

Function at 0x40dba0
Capabilities:
Get common file path

Disassembly:
sub esp, 8
lea eax, [esp]
mov dword [esp], 0
push eax
mov dword [esp + 8], 0
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [esp]
test ecx, ecx
je 0x40dc1b
test eax, eax
jne 0x40dc1b
mov edx, dword [esp + 0x10]
lea ecx, [esp + 4]
push ecx
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40dc1b
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x40dc1b
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x40dc06
mov eax, dword [esp]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [esp]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, 1
add esp, 8
ret 8
xor eax, eax
add esp, 8
ret 8
Function at 0x40df20
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x528
push ebp
push esi
mov esi, dword [esp + 0x534]
mov dword [esp + 0x10], ecx
test esi, esi
je 0x40dfda
lea eax, [esp + 0x14]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push eax
push 0
push 0
lea ecx, [esp + 0x14]
push 0
lea edx, [esp + 0x2c]
push ecx
push edx
push 0
push esi
mov dword [esp + 0x28], 0x514
call ebp
test eax, eax
jne 0x40dfda
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push edi
lea eax, [esp + 0x14]
lea ecx, [esp + 0x24]
push eax
push 0x2001f
push 0
push ecx
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x40df97
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push edx
call fcn.0040df20
lea eax, [esp + 0x24]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test edi, edi
jne 0x40dfb2
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x10]
push edx
push 0
push 0
push 0
lea ecx, [esp + 0x34]
push eax
push ecx
push 0
push esi
mov dword [esp + 0x30], 0x514
call ebp
test eax, eax
je 0x40df6f
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x528
ret 4

Function at 0x40dff0
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push ecx
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
push str.SoftwareBCGP_AppWizard_Generated_Applications_
mov edi, ecx
push closesocket
call ebx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x40e03d
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, edi
call fcn.0040df20
mov edx, dword [esp + 0x10]
push edx
call ebp
push str.SoftwareBCGP_AppWizard_Generated_Applications_
push closesocket
call esi
push str.Softwarepig3_addbooksListCtrl
push closesocket
call esi
push str.Softwarepig3_addbooksSettings
push closesocket
call esi
push str.Softwarepig3_addbooks
push closesocket
call esi
push 0x41a388
push closesocket
call esi
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push eax
push ecx
push edx
call ebx
test eax, eax
je 0x40e092
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 0xc
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
je 0x40e0b7
mov edx, dword [esp + 0x10]
push edx
call ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 0xc
mov eax, dword [esp + 0x10]
push eax
call ebp
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret 0xc
Function at 0x40e580
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x400
push ebx
mov ebx, dword [esp + 0x408]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x40e5a7
pop esi
pop ebx
add esp, 0x400
ret 4
push str.DllUnregisterServer
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x40e5cb
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
xor eax, eax
pop ebx
add esp, 0x400
ret 4
push edi
call eax
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0xc]
push ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push str.regsvr32___s___u__s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0xc]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x400
ret 4