joyce8/EMBER2024-capa huggingface dataset:
Function at 0x67e019
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov edx, dword [ebx + 0x24]
push esi
mov dword [ebp - 8], edx
push edi
mov ecx, dword [ebx + 0x64]
mov eax, dword [ebx + 0x34]
mov esi, dword [ebx + 0x6c]
sub eax, ecx
sub eax, esi
mov dword [ebp - 4], eax
jne 0x67e045
test ecx, ecx
jne 0x67e04f
test esi, esi
jne 0x67e04f
mov eax, edx
jmp 0x67e0c0
cmp eax, 0xffffffff
jne 0x67e04f
push 0xfffffffffffffffe
pop eax
jmp 0x67e0c0
mov esi, dword [ebx + 0x24]
lea esi, [edx + esi - 0x106]
cmp ecx, esi
jb 0x67e0c0
mov edi, dword [ebx + 0x30]
mov ecx, edx
mov eax, ecx
shr ecx, 2
lea esi, [edi + edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x44]
mov eax, dword [ebx + 0x3c]
sub dword [ebx + 0x68], edx
sub dword [ebx + 0x64], edx
sub dword [ebx + 0x54], edx
lea eax, [eax + ecx*2]
dec eax
dec eax
movzx esi, word [eax]
mov edi, esi
sub edi, edx
cmp esi, edx
sbb esi, esi
not esi
and esi, edi
dec ecx
mov word [eax], si
jne 0x67e085
mov eax, dword [ebx + 0x38]
mov esi, edx
lea eax, [eax + edx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edi, ecx
sub edi, edx
cmp ecx, edx
sbb ecx, ecx
not ecx
and ecx, edi
dec esi
mov word [eax], cx
jne 0x67e0a4
mov eax, dword [ebp - 4]
add eax, edx
mov esi, dword [ebx]
cmp dword [esi + 4], 0
mov dword [ebp - 0xc], esi
je 0x67e16d
mov edi, dword [ebx + 0x6c]
add edi, dword [ebx + 0x64]
mov ecx, dword [esi + 4]
add edi, dword [ebx + 0x30]
cmp ecx, eax
mov dword [ebp - 4], ecx
jbe 0x67e0e5
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x67e0ef
xor ecx, ecx
jmp 0x67e12e
sub ecx, dword [ebp - 4]
mov eax, dword [esi + 0x1c]
mov dword [esi + 4], ecx
cmp dword [eax + 0x18], 0
jne 0x67e111
push dword [ebp - 4]
push dword [esi]
push dword [esi + 0x30]
call fcn.006a4638
mov edx, dword [ebp - 8]
mov dword [esi + 0x30], eax
mov ecx, dword [ebp - 4]
mov esi, dword [esi]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov eax, dword [ebp - 0xc]
add dword [eax], ecx
add dword [eax + 8], ecx
add dword [ebx + 0x6c], ecx
mov edi, dword [ebx + 0x6c]
cmp edi, 3
jb 0x67e159
mov eax, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x30]
lea esi, [eax + ecx]
movzx eax, byte [esi]
mov ecx, dword [ebx + 0x50]
mov dword [ebx + 0x40], eax
shl eax, cl
movzx ecx, byte [esi + 1]
xor eax, ecx
and eax, dword [ebx + 0x4c]
mov dword [ebx + 0x40], eax
cmp edi, 0x106
jae 0x67e16d
mov eax, dword [ebx]
cmp dword [eax + 4], 0
jne 0x67e027
pop edi
pop esi
leave
ret
Function at 0x40102b
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push esi
push edi
lea eax, [ebp - 8]
xor edi, edi
push eax
push dword [ebp + 8]
mov dword [ebx + 4], edi
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], edi
mov dword [ebp - 8], edi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0xc], eax
mov eax, dword [0x4cd420]
mov esi, 0x4cd420
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov ecx, esi
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x30], eax
call fcn.004073d2
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
push dword [eax]
lea eax, [ebp - 0x30]
push eax
call fcn.0040d2cf
cmp dword [ebp - 8], edi
mov dword [ebp + 8], edi
jle 0x40115a
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
lea edi, [eax + ecx*4]
mov eax, dword [edi]
movzx ecx, word [eax]
cmp cx, 0x2f
je 0x4010cf
cmp cx, 0x2d
je 0x4010cf
push eax
lea eax, [ebp - 0x10]
call fcn.0040d2a4
lea eax, [ebp - 0x10]
push eax
lea edi, [ebp - 0x28]
call fcn.00401f81
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.00405cc6
jmp 0x40114b
lea eax, [ebp - 0x30]
push eax
mov esi, ebx
call fcn.0040204b
mov eax, dword [edi]
inc eax
inc eax
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.0040d2cf
push 0x3d
xor ecx, ecx
lea esi, [ebp - 0x30]
call fcn.0040d222
mov esi, eax
cmp esi, 0xffffffff
je 0x401143
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax - 0xc]
lea eax, [ebp - 0x14]
sub ecx, esi
push eax
dec ecx
lea eax, [ebp - 0x30]
call fcn.00401d3a
lea edi, [ebp - 0x2c]
call fcn.0040d365
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00405cc6
mov ecx, esi
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x30]
call fcn.0040d1ec
lea edi, [ebp - 0x30]
call fcn.0040d365
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.00405cc6
lea esi, [ebp - 0x28]
call fcn.00401fdc
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jl 0x401093
lea eax, [ebp - 0x30]
push eax
mov esi, ebx
call fcn.0040204b
lea edi, [ebp - 0x30]
call fcn.0040129d
pop edi
mov eax, ebx
pop esi
leave
ret 4

Function at 0x40130a
Capabilities:
Set registry value

Disassembly:
push edi
xor edi, edi
cmp dword [esi], edi
je 0x401338
push dword [esp + 0xc]
call fcn.00470006
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [esp + 0x10]
push 1
push edi
push dword [esp + 0x18]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x401338
inc edi
mov eax, edi
pop edi
ret 8
Function at 0x40133e
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x11c
push esi
push edi
mov esi, 0x11c
push esi
xor edi, edi
lea eax, [ebp - 0xa4]
push edi
push eax
call fcn.0046eea0
add esp, 0xc
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetVersionExW]
push eax
call esi
cmp eax, edi
jne 0x401397
lea eax, [ebp - 0xa4]
push eax
mov dword [ebp - 0xa4], 0x114
call esi
cmp eax, edi
je 0x401445
mov eax, dword [ebp - 0x94]
dec eax
je 0x401431
dec eax
jne 0x401445
cmp dword [ebp - 0xa0], 6
jne 0x4013e2
inc eax
cmp dword [ebp - 0x9c], eax
jne 0x4013ca
xor ecx, ecx
cmp byte [ebp + 0x76], al
setne cl
add ecx, 8
jmp 0x4013de
cmp dword [ebp - 0x9c], edi
jne 0x40141e
xor ecx, ecx
cmp byte [ebp + 0x76], al
setne cl
lea ecx, [ecx + ecx + 7]
mov edi, ecx
jmp 0x401445
cmp dword [ebp - 0xa0], 5
jne 0x401411
cmp dword [ebp - 0x9c], 2
jne 0x4013f8
push 5
jmp 0x40142e
cmp dword [ebp - 0x9c], 1
jne 0x401405
push 6
jmp 0x40142e
cmp dword [ebp - 0x9c], edi
jne 0x401445
push 3
jmp 0x40142e
cmp dword [ebp - 0xa0], 4
ja 0x401445
push 4
jmp 0x40142e
cmp dword [ebp - 0x9c], 2
jne 0x401445
cmp byte [ebp + 0x76], al
jne 0x401445
push 0xa
pop edi
jmp 0x401445
mov eax, dword [ebp - 0x98]
and eax, 0xffff0000
cmp eax, 0x45a0000
sbb edi, edi
inc edi
inc edi
mov eax, edi
pop edi
pop esi
add ebp, 0x78
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x4cd420]
push ebx
push esi
push edi
mov ecx, 0x4cd420
call dword [eax + 0xc]
mov edi, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
add edi, 0x10
sub eax, 0x10
mov dword [ebp - 8], edi
call fcn.0040d24c
add eax, 0x10
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
call fcn.004226b0
pop ecx
push 0x15
pop esi
call fcn.00406d69
push eax
lea eax, [ebp - 4]
push eax
call fcn.00401d83
mov esi, dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401aef
test al, 0x20
je 0x401aef
lea eax, [ebp - 4]
lea edi, [ebp - 8]
call fcn.0040d365
lea eax, [esi - 0x10]
call fcn.00405cc6
push 0x14
pop esi
call fcn.00406d69
push eax
lea eax, [ebp - 4]
push eax
call fcn.00412c54
pop ecx
pop ecx
push str._src:2
lea eax, [ebp - 0xc]
call fcn.0040d2a4
mov esi, dword [ebp - 4]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
push esi
push ebx
push edi
call fcn.00412959
add esp, 0xc
lea eax, [ebx - 0x10]
call fcn.00405cc6
lea eax, [esi - 0x10]
call fcn.00405cc6
lea eax, [edi - 0x10]
call fcn.00405cc6
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4020c7
Capabilities:
Log keystrokes

Disassembly:
sub esp, 0x10
mov eax, dword [0x4ce334]
push ebx
push ebp
push esi
xor esi, esi
cmp eax, esi
push edi
mov dword [esp + 0x18], esi
je 0x4020e2
mov edi, dword [eax + 4]
jmp 0x4020e4
xor edi, edi
cmp edi, esi
jne 0x4020f4
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov edi, eax
cmp edi, esi
je 0x402119
call dword [sym.imp.USER32.dll_GetDesktopWindow]
cmp edi, eax
je 0x402119
push edi
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x402119
push esi
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [esp + 0x18], 1
mov ebp, dword [esp + 0x24]
push edi
mov eax, ebp
mov dword [ebp + 0x34c], esi
call fcn.00402439
mov ecx, eax
cmp ecx, esi
mov dword [esp + 0x14], ecx
jne 0x402145
push 1
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
xor eax, eax
jmp 0x40225d
mov eax, dword [0x4ce334]
cmp eax, esi
mov dword [esp + 0x1c], esi
je 0x40215c
mov edx, dword [eax + 4]
mov dword [esp + 0x1c], edx
mov dword [eax + 4], ecx
lea ebx, [ebp + 4]
push ebx
mov eax, edi
call fcn.00406816
cmp dword [ebp + 0x33c], esi
je 0x4021fc
push esi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebp, eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
push esi
push esi
push esi
push 0x2001
mov dword [esp + 0x20], eax
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
push 0x43
push esi
push esi
push esi
push esi
push esi
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_SetWindowPos]
cmp ebp, dword [esp + 0x10]
je 0x4021bf
push 1
push ebp
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_AttachThreadInput]
push dword [esp + 0x14]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
cmp ebp, dword [esp + 0x10]
je 0x4021db
push esi
push ebp
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_AttachThreadInput]
push 0xffffffffffffffec
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowLongW]
test eax, 0x80000
je 0x4021f8
push esi
push esi
push 0xf
push dword [ebx]
call dword [sym.imp.USER32.dll_PostMessageW]
mov ebp, dword [esp + 0x24]
mov eax, ebp
call fcn.0042f219
push 0x97
push esi
push esi
push esi
push esi
push esi
push dword [ebx]
mov dword [ebp + 0x34c], esi
call dword [sym.imp.USER32.dll_SetWindowPos]
cmp dword [esp + 0x18], esi
je 0x40223f
push 1
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
cmp edi, esi
je 0x40223f
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [ebx]
jne 0x40223f
push edi
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [0x4ce334]
cmp eax, esi
je 0x40224f
mov ecx, dword [esp + 0x1c]
mov dword [eax + 4], ecx
push dword [ebx]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [ebp + 0x350]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
Function at 0x4062c0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, eax
mov eax, dword [esi]
xor ebx, ebx
cmp dword [eax - 0xc], ebx
push edi
mov dword [ebp - 8], ebx
je 0x40639c
mov eax, dword [0x4cd420]
mov ecx, 0x4cd420
call dword [eax + 0xc]
push dword [ebp + 0x10]
add eax, 0x10
push dword [ebp + 8]
mov dword [ebp - 4], eax
push dword [esi]
lea eax, [ebp - 4]
push str._s_d._s
call fcn.0040cd21
add esp, 0x10
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0x10], eax
je 0x406391
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov edi, eax
cmp edi, ebx
je 0x406388
mov esi, dword [ebp + 0xc]
push ebx
lea eax, [ebp + 8]
push eax
push edi
lea eax, [edi + 0xa]
push eax
mov dword [ebp + 8], ebx
call fcn.00405cde
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x40637f
cmp dword [ebp + 8], edi
jne 0x40637f
mov eax, edi
call fcn.00406210
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.00405cc6
xor eax, eax
inc eax
jmp 0x40639f
xor eax, eax
mov edx, esi
call fcn.00405ca6
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.00405cc6
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x4063ed
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
push dword [ebp + 0xc]
mov esi, eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov edi, eax
test edi, edi
jne 0x40640c
xor eax, eax
jmp 0x40645c
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
mov dword [ebp - 8], eax
je 0x406408
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
test eax, eax
mov dword [ebp - 4], eax
je 0x406408
push ebx
lea ebx, [edi + 1]
push ebx
call fcn.00405cde
test eax, eax
je 0x406448
push edi
push dword [ebp - 4]
push eax
call fcn.0046f3a0
add esp, 0xc
mov eax, ebx
call fcn.00406210
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_FreeResource]
xor eax, eax
inc eax
pop ebx
pop edi
pop esi
leave
ret

Function at 0x406518
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
jne 0x40652f
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov edi, eax
test edi, edi
je 0x406564
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x406560
cmp edi, eax
jae 0x406564
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x406552
cmp edi, eax
jb 0x406568
xor eax, eax
jmp 0x406572
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret
Function at 0x406ff6
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
call fcn.00405b89
push dword [esi]
lea eax, [ebp - 4]
push eax
push esi
call fcn.00407120
mov edi, dword [ebp - 4]
xor esi, esi
cmp dword [edi - 0xc], esi
je 0x40707a
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40707a
lea eax, [ebp - 0x14]
mov ebx, vtable.Gdiplus::PrivateFontCollection.0
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], esi
call sub.gdiplus.dll_GdipNewPrivateFontCollection
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
call sub.gdiplus.dll_GdipPrivateAddFontFile
mov dword [ebp - 0x10], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
call sub.gdiplus.dll_GdipGetFontCollectionFamilyCount
mov esi, dword [ebp - 8]
test esi, esi
mov dword [ebp - 0x10], eax
jg 0x407089
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x18], ebx
call sub.gdiplus.dll_GdipDeletePrivateFontCollection
mov dword [ebp - 0x18], vtable.Gdiplus::FontCollection.0
lea eax, [edi - 0x10]
call fcn.00405cc6
pop edi
pop esi
pop ebx
leave
ret 4
xor ecx, ecx
push 8
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call sub.gdiplus.dll_GdipAlloc
test eax, eax
je 0x4070cc
mov dword [eax], esi
add eax, 4
lea edx, [esi - 1]
test edx, edx
mov ecx, eax
jl 0x4070ce
and dword [ecx], 0
and dword [ecx + 4], 0
add ecx, 8
dec edx
jns 0x4070bd
jmp 0x4070ce
xor eax, eax
test eax, eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
jne 0x4070f3
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x18], ebx
call sub.gdiplus.dll_GdipDeletePrivateFontCollection
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], vtable.Gdiplus::FontCollection.0
add eax, 0xfffffff0
jmp 0x40707d
push eax
push esi
lea edi, [ebp - 0xc]
lea eax, [ebp - 0x18]
call fcn.00407303
test eax, eax
jne 0x407116
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jle 0x407116
mov eax, dword [ebp + 8]
mov dword [eax + 8], esi
mov dword [eax + 0xc], ecx
jmp 0x4070d8
mov esi, dword [ebp + 8]
call fcn.00405b89
jmp 0x4070d8

Function at 0x407260
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
and word [ebp - 0x210], 0
push 0x20e
lea eax, [ebp - 0x20e]
push 0
push eax
call fcn.0046eea0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryW]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x210]
push eax
mov eax, dword [ebp + 8]
call fcn.0040d2a4
mov eax, dword [ebp + 8]
leave
ret 4
Function at 0x40c983
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [esi]
and dword [esi], 0
add eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push 0
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40c9e6
cmp dword [ebp + 0xc], 1
je 0x40c9bf
cmp dword [ebp + 0xc], 2
je 0x40c9bf
push 0xd
pop eax
jmp 0x40c9e6
test edi, edi
mov eax, dword [ebp - 4]
je 0x40c9e0
test eax, eax
je 0x40c9dc
test al, 1
jne 0x40c9ba
mov ecx, eax
shr ecx, 1
cmp word [edi + ecx*2 - 2], 0
je 0x40c9e0
jmp 0x40c9ba
and word [edi], 0
shr eax, 1
mov dword [esi], eax
xor eax, eax
leave
ret 8

Function at 0x40d3a6
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebx]
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], ecx
je 0x40d434
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [ebp - 4]
push edx
push ecx
lea edx, [ebp - 8]
push edx
push ecx
push dword [ebp + 8]
push eax
call edi
cmp dword [ebp - 8], 1
je 0x40d3dd
cmp dword [ebp - 8], 2
jne 0x40d433
push esi
mov esi, dword [ebp + 0xc]
call fcn.0040d10e
mov eax, dword [ebp - 4]
shr eax, 1
inc eax
push eax
call fcn.0040d0e8
mov esi, eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 8]
push dword [ebx]
call edi
test eax, eax
jne 0x40d432
mov eax, dword [ebp - 4]
shr eax, 1
and word [esi + eax*2], 0
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x40d424
push eax
call fcn.00470006
pop ecx
mov edx, esi
call fcn.00406d29
mov dword [ebp - 0xc], 1
pop esi
pop edi
mov eax, dword [ebp - 0xc]
leave
ret 8
Function at 0x40d7b7
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
xor ebx, ebx
push edi
push ebx
mov esi, eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.00412167
lea eax, [esp + 0x10]
mov dword [esp], str.btbg.gif
call fcn.0040d2a4
lea eax, [esp + 0xc]
push eax
lea edi, [esp + 0x14]
call fcn.00401f81
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
call fcn.00405cc6
push str..kid
lea eax, [esp + 0x10]
call fcn.0040d2a4
lea eax, [esp + 0xc]
push eax
call fcn.00401f81
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
call fcn.00405cc6
mov eax, dword [esi]
cmp dword [eax - 0xc], ebx
je 0x40d853
push str.scom.xml
mov eax, esi
lea ecx, [esp + 0x10]
call fcn.00407392
pop ecx
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
call fcn.00405cc6
mov eax, dword [esi]
xor edi, edi
inc edi
cmp dword [eax - 0xc], ebx
je 0x40d879
push eax
call fcn.0040d8d4
test eax, eax
je 0x40d879
push esi
push 0x40db28
push ebx
push edi
push dword [esi]
call fcn.0041208d
add esp, 0x14
mov eax, dword [esi + 4]
cmp dword [eax - 0xc], ebx
je 0x40d89a
push eax
call fcn.0040d8d4
test eax, eax
je 0x40d89a
push ebx
push ebx
push edi
push edi
push dword [esi + 4]
call fcn.0041208d
add esp, 0x14
mov eax, dword [esi + 8]
cmp dword [eax - 0xc], ebx
je 0x40d8bb
push eax
call fcn.0040d8d4
test eax, eax
je 0x40d8bb
push ebx
push ebx
push edi
push edi
push dword [esi + 8]
call fcn.0041208d
add esp, 0x14
push edi
call fcn.00412167
pop ecx
lea esi, [esp + 0x10]
call fcn.00402324
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e2b7
test al, 0x10
jne 0x40e2b7
xor eax, eax
inc eax
ret
xor eax, eax
ret

Function at 0x40e32f
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x200
push edi
xor edi, edi
cmp dword [ebp + 8], edi
je 0x40e3b8
cmp dword [ebp + 0xc], edi
je 0x40e3b8
push dword [ebp + 8]
call fcn.0040e2a0
test al, al
pop ecx
je 0x40e3b8
push esi
push 0x1fe
lea eax, [ebp - 0x1fe]
push edi
push eax
mov esi, 0x80004005
mov word [ebp - 0x200], di
call fcn.0046eea0
add esp, 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x200]
push 0x100
push eax
push edi
push dword [ebp + 0xc]
push str.SPCfg
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringW]
test eax, eax
je 0x40e3b3
lea eax, [ebp - 0x200]
push eax
call fcn.00470006
mov esi, dword [ebp + 0x10]
pop ecx
lea ecx, [ebp - 0x200]
call fcn.00415f20
xor esi, esi
mov eax, esi
pop esi
jmp 0x40e3bd
mov eax, 0x80004005
pop edi
leave
ret
Function at 0x40e5f3
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x800
cmp dword [ebp + 8], 0
push esi
mov esi, eax
jne 0x40e60f
mov eax, 0x80004005
jmp 0x40e69d
push dword [ebp + 8]
call fcn.0040e2a0
test al, al
pop ecx
je 0x40e605
and word [ebp - 0x800], 0
push edi
push 0x7fe
lea eax, [ebp - 0x7fe]
push 0
push eax
mov edi, 0x80004005
call fcn.0046eea0
add esp, 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x800]
push 0x400
push eax
push 0
mov eax, str.SPRoot
push eax
push eax
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringW]
test eax, eax
je 0x40e69a
lea eax, [ebp - 0x800]
push eax
call fcn.00470006
pop ecx
lea ecx, [ebp - 0x800]
call fcn.00415f20
mov eax, dword [esi + 0x14]
lea edi, [eax - 1]
mov eax, esi
call fcn.00413ece
cmp word [eax], 0x5c
je 0x40e698
push 0x4b2530
push esi
call fcn.00413eb0
xor edi, edi
mov eax, edi
pop edi
pop esi
leave
ret

Function at 0x40e715
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x800
cmp dword [ebp + 8], 0
push esi
je 0x40e7a4
xor eax, eax
mov esi, str.kxebase.dll
cmp eax, esi
je 0x40e7a4
push dword [ebp + 8]
call fcn.0040e2a0
test al, al
pop ecx
je 0x40e7a4
and word [ebp - 0x800], 0
push ebx
push 0x7fe
lea eax, [ebp - 0x7fe]
push 0
push eax
mov ebx, 0x80004005
call fcn.0046eea0
add esp, 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x800]
push 0x400
push eax
push 0
push esi
push str.ProductInfo
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringW]
test eax, eax
je 0x40e79f
lea eax, [ebp - 0x800]
push eax
call fcn.00470006
mov esi, dword [ebp + 0xc]
pop ecx
lea ecx, [ebp - 0x800]
call fcn.00415f20
xor ebx, ebx
mov eax, ebx
pop ebx
jmp 0x40e7a9
mov eax, 0x80004005
pop esi
leave
ret

Function at 0x40e977
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, eax
xor eax, eax
cmp dword [esp + 8], eax
je 0x40e9cf
push edi
movzx ecx, byte [esi]
mov dx, ax
dec dword [esp + 0xc]
shr dx, 0xc
movzx edx, dl
shl eax, 4
mov edi, ecx
shr edi, 4
xor edx, edi
xor ax, word [edx*2 + 0x4b34a8]
and ecx, 0xf
movzx eax, ax
mov dx, ax
shr dx, 0xc
movzx edx, dl
shl eax, 4
xor edx, ecx
xor ax, word [edx*2 + 0x4b34a8]
inc esi
cmp dword [esp + 0xc], 0
movzx eax, ax
jne 0x40e983
pop edi
pop esi
ret