joyce8/EMBER2024-capa huggingface dataset:
Function at 0x419b40
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x46166c]
xor eax, ebp
mov dword [ebp - 4], eax
xor ecx, ecx
mov eax, ecx
shr eax, 1
test cl, 1
je 0x419b63
xor eax, 0xedb88320
test al, 1
je 0x419b70
shr eax, 1
xor eax, 0xedb88320
jmp 0x419b72
shr eax, 1
test al, 1
je 0x419b7f
shr eax, 1
xor eax, 0xedb88320
jmp 0x419b81
shr eax, 1
test al, 1
je 0x419b8e
shr eax, 1
xor eax, 0xedb88320
jmp 0x419b90
shr eax, 1
test al, 1
je 0x419b9d
shr eax, 1
xor eax, 0xedb88320
jmp 0x419b9f
shr eax, 1
test al, 1
je 0x419bac
shr eax, 1
xor eax, 0xedb88320
jmp 0x419bae
shr eax, 1
test al, 1
je 0x419bbb
shr eax, 1
xor eax, 0xedb88320
jmp 0x419bbd
shr eax, 1
test al, 1
je 0x419bca
shr eax, 1
xor eax, 0xedb88320
jmp 0x419bcc
shr eax, 1
mov dword [ebp + ecx*4 - 0x404], eax
inc ecx
cmp ecx, 0x100
jl 0x419b55
or eax, 0xffffffff
xor ecx, ecx
test edx, edx
jle 0x419c0f
push ebx
push edi
jmp 0x419bf0
movsx edi, byte [ecx + esi]
mov ebx, eax
and ebx, 0xff
xor edi, ebx
shr eax, 8
xor eax, dword [ebp + edi*4 - 0x404]
inc ecx
cmp ecx, edx
jl 0x419bf0
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
not eax
call fcn.0042ed1f
mov esp, ebp
pop ebp
ret
Function at 0x41a010
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44f297
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x46166c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebx], 0x4572e8
mov dword [ebx + 0x68], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov dword [ebp - 4], eax
mov ecx, dword [ebx]
mov edx, dword [ecx + 4]
mov dword [ebx + edx], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebx]
mov esi, dword [eax + 4]
add esi, ebx
mov dword [ebp - 0x10], 1
call fcn.004058b0
push 0x20
lea edi, [ebx + 0x10]
push esi
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], 0
call fcn.0040ac00
cmp dword [esi + 0x38], 0
mov byte [esi + 0x40], al
jne 0x41a0b0
mov eax, dword [esi + 0xc]
or eax, 4
or eax, 4
and eax, 0x17
mov dword [esi + 0xc], eax
test dword [esi + 0x10], eax
je 0x41a0b0
push 0
mov ecx, esi
call fcn.004057a0
mov dword [ebp - 4], 2
mov ecx, dword [ebx]
mov edx, dword [ecx + 4]
push edi
mov dword [ebx + edx], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
call fcn.00409ec0
lea ecx, [edi + 0x18]
mov dword [edi + 0x20], ecx
lea eax, [edi + 8]
mov dword [edi + 0x10], eax
lea edx, [edi + 0x1c]
mov dword [edi + 0x24], edx
mov dword [edi], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [edi + 0x50], 0
mov byte [edi + 0x49], 0
lea ecx, [edi + 0x28]
mov dword [edi + 0x30], ecx
xor ecx, ecx
lea eax, [edi + 0xc]
mov dword [edi + 0x14], eax
lea edx, [edi + 0x2c]
mov dword [edi + 0x34], edx
mov dword [eax], ecx
mov eax, dword [edi + 0x24]
mov dword [eax], ecx
mov edx, dword [edi + 0x34]
mov dword [edx], ecx
mov eax, dword [edi + 0x10]
mov dword [eax], ecx
mov edx, dword [edi + 0x20]
mov dword [edx], ecx
mov eax, dword [edi + 0x30]
mov edx, dword [0x464958]
mov dword [eax], ecx
mov dword [edi + 0x54], ecx
mov dword [edi + 0x4c], edx
mov dword [edi + 0x44], ecx
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x41aa10
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44f247
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x46166c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebx], 0x455f78
mov dword [ebx + 0x60], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov dword [ebp - 4], eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
mov dword [ebx + ecx], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov edx, dword [ebx]
mov esi, dword [edx + 4]
add esi, ebx
mov dword [ebp - 0x10], 1
call fcn.004058b0
push 0x20
lea edi, [ebx + 4]
push esi
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], 0
call fcn.0040ac00
cmp dword [esi + 0x38], 0
mov byte [esi + 0x40], al
jne 0x41aaaa
mov eax, dword [esi + 0xc]
or eax, 4
or eax, 4
and eax, 0x17
mov dword [esi + 0xc], eax
test dword [esi + 0x10], eax
je 0x41aaaa
push 0
mov ecx, esi
call fcn.004057a0
mov dword [ebp - 4], 2
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
push edi
mov dword [ebx + ecx], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
call fcn.00409ec0
lea edx, [edi + 8]
mov dword [edi + 0x10], edx
lea ecx, [edi + 0x18]
mov dword [edi + 0x20], ecx
lea edx, [edi + 0x1c]
mov dword [edi + 0x24], edx
mov dword [edi], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [edi + 0x50], 0
mov byte [edi + 0x49], 0
lea ecx, [edi + 0x28]
mov dword [edi + 0x30], ecx
xor ecx, ecx
lea eax, [edi + 0xc]
mov dword [edi + 0x14], eax
lea edx, [edi + 0x2c]
mov dword [edi + 0x34], edx
mov dword [eax], ecx
mov eax, dword [edi + 0x24]
mov dword [eax], ecx
mov edx, dword [edi + 0x34]
mov dword [edx], ecx
mov eax, dword [edi + 0x10]
mov dword [eax], ecx
mov edx, dword [edi + 0x20]
mov dword [edx], ecx
mov eax, dword [edi + 0x30]
mov edx, dword [0x464958]
mov dword [eax], ecx
mov dword [edi + 0x54], ecx
mov dword [edi + 0x4c], edx
mov dword [edi + 0x44], ecx
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x41be00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x450398
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x46166c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [edi + 0x44], ebx
je 0x41bf20
cmp byte [edi + 0x49], bl
je 0x41bf20
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
mov ecx, edi
call edx
cmp eax, 0xffffffff
je 0x41bf14
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x2c], bl
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], 8
cmp ecx, 0x10
jae 0x41be74
lea eax, [ebp - 0x2c]
mov byte [eax + 8], bl
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x18]
mov edx, eax
cmp ebx, 0x10
jae 0x41be8c
lea edx, [ebp - 0x2c]
mov eax, edx
add edx, dword [ebp - 0x1c]
mov ecx, dword [edi + 0x44]
mov esi, dword [ecx]
lea ebx, [ebp - 0x30]
push ebx
push edx
push eax
lea eax, [edi + 0x4c]
push eax
mov eax, dword [esi + 0x18]
call eax
sub eax, 0
je 0x41beb5
dec eax
je 0x41beb9
sub eax, 2
lea ecx, [ebp - 0x2c]
jne 0x41bf0f
jmp 0x41bf1b
mov byte [edi + 0x49], 0
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov ecx, eax
cmp ebx, 0x10
jae 0x41bec9
lea ecx, [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
sub esi, ecx
je 0x41bef2
cmp ebx, 0x10
jae 0x41bed8
lea eax, [ebp - 0x2c]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call fcn.0043188c
add esp, 0x10
cmp esi, eax
jne 0x41bf0c
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
cmp byte [edi + 0x49], 0
je 0x41bf18
test esi, esi
jne 0x41be80
push esi
push 8
lea ecx, [ebp - 0x2c]
call fcn.00408a30
jmp 0x41be7a
lea ecx, [ebp - 0x2c]
call fcn.004078f0
xor al, al
jmp 0x41bf22
lea ecx, [ebp - 0x2c]
call fcn.004078f0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ed1f
mov esp, ebp
pop ebp
ret
Function at 0x41f9e0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov eax, dword [0x46166c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebx + 4]
push edi
mov dword [ebx], eax
mov byte [eax], 0
push 0x454939
or eax, 0xffffffff
mov esi, ebx
call fcn.004148e0
lea eax, [ebp - 0x1ac]
mov dword [ebp - 0x1b0], eax
push str.Software_
or eax, 0xffffffff
lea esi, [ebp - 0x1b0]
mov byte [ebp - 0x1ac], 0
call fcn.004148e0
push str.bianya2
mov eax, esi
call fcn.004147e0
mov eax, dword [ebp - 0x1b0]
lea ecx, [ebp - 0x1b4]
push ecx
push 0x20019
push 0
push eax
push 0x80000002
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41fad4
push 0x103
push eax
lea edx, [ebp - 0x10f]
push edx
mov byte [ebp - 0x110], al
call fcn.00439380
mov edx, dword [ebp - 0x1b4]
add esp, 0xc
lea eax, [ebp - 0x1b8]
push eax
lea ecx, [ebp - 0x110]
push ecx
push 0
push 0
push 0x4549b4
push edx
mov dword [ebp - 0x1b8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x41fac7
lea eax, [ebp - 0x110]
push eax
push 0x4549b8
mov edi, ebx
call fcn.00414dd0
add esp, 8
mov ecx, dword [ebp - 0x1b4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebx]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fae0
sub eax, edx
test eax, eax
jg 0x41fbf8
lea edx, [ebp - 0x1b8]
push edx
lea eax, [ebp - 0x1b4]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea ecx, [ebp - 0x1b4]
push ecx
push 0x20006
push 0
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41fbf8
lea edx, [ebp - 0x120]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x116]
movzx edx, word [ebp - 0x118]
push ecx
movzx ecx, word [ebp - 0x11e]
lea eax, [ebp - 0x164]
push edx
movzx edx, word [ebp - 0x120]
mov dword [ebp - 0x168], eax
movzx eax, word [ebp - 0x11a]
push eax
push ecx
push edx
push str.__d_02d_02d_02d_02d
lea edi, [ebp - 0x168]
mov byte [ebp - 0x164], 0
call fcn.00414dd0
mov edx, dword [ebp - 0x168]
mov eax, edx
add esp, 0x18
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fba0
sub eax, esi
push eax
mov eax, dword [ebp - 0x1b4]
push edx
push 1
push 0
push 0x4549b4
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x1b4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x168]
push edx
or eax, 0xffffffff
mov esi, ebx
call fcn.004148e0
mov eax, dword [ebp - 0x168]
lea ecx, [ebp - 0x164]
cmp eax, ecx
je 0x41fbf8
push eax
call fcn.0042f7b1
add esp, 4
mov eax, dword [ebp - 0x1b0]
lea edx, [ebp - 0x1ac]
cmp eax, edx
je 0x41fc11
push eax
call fcn.0042f7b1
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov eax, ebx
pop esi
call fcn.0042ed1f
mov esp, ebp
pop ebp
ret
Function at 0x41fc30
Capabilities:
Check if file exists
Create directory
Extract resource via kernel32 functions
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44f108
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x46166c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x140], eax
push 0x457338
push 0x66
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x41fd6b
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
push esi
test ebx, ebx
jne 0x41fcaa
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
cmp eax, edx
jmp 0x41fd73
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x41fd6b
push edi
call fcn.0042e2b1
add esp, 4
mov dword [0x464848], eax
test eax, eax
je 0x41fce6
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [0x464848]
push eax
push edx
call fcn.00432a70
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
push 0x12c
lea eax, [ebp - 0x13c]
push 0
push eax
call fcn.00439380
push edi
call fcn.004260a0
mov edi, eax
add esp, 0x10
test edi, edi
je 0x41fd66
push 0xffffffffffffffff
lea edx, [ebp - 0x13c]
call fcn.00426110
add esp, 4
test eax, eax
jne 0x41fd66
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41fd3e
mov edx, dword [ebp + 0xc]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
sub esp, 0x44
lea ecx, [ebp + 0xc]
mov eax, esp
mov dword [ebp - 0x144], esp
push ecx
call fcn.00414790
mov edx, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x140]
push edx
mov edx, edi
call fcn.0041fda0
call fcn.00426150
mov eax, dword [ebp + 0xc]
lea ecx, [ebp + 0x10]
cmp eax, ecx
je 0x41fd7e
push eax
call fcn.0042f7b1
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ed1f
mov esp, ebp
pop ebp
ret 0x48
Function at 0x41fda0
Capabilities:
Create directory
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44f0d0
mov eax, dword fs:[0]
push eax
sub esp, 0x17c
mov eax, dword [0x46166c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, edx
mov dword [ebp - 0x184], edi
mov dword [ebp - 0x188], esi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [edi + 0x98]
cmp eax, ebx
je 0x41fdfe
mov ecx, dword [ebp + 8]
push ebx
push ecx
push 0x52c
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
cmp dword [ebp + 8], ebx
jle 0x41ff87
jmp 0x41fe16
mov esi, dword [ebp - 0x188]
push 0x12c
lea edx, [ebp - 0x180]
push 0
push edx
call fcn.00439380
add esp, 0xc
test esi, esi
jne 0x41fe3c
mov dword [0x464878], 0x10000
jmp 0x41fe61
cmp dword [esi], 1
je 0x41fe4d
mov dword [0x464878], 0x80000
jmp 0x41fe61
mov ecx, dword [esi + 4]
push ebx
lea edx, [ebp - 0x180]
call fcn.00425690
mov dword [0x464878], eax
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x50]
mov dword [ebp - 0x54], eax
mov byte [ebp - 0x50], 0
test edi, edi
jne 0x41fe77
mov edi, 0x454939
mov ecx, edi
lea esi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x41fe80
sub ecx, esi
mov esi, ecx
cmp esi, 0x3f
jl 0x41fea8
lea eax, [esi + 1]
push eax
push 0
mov dword [ebp - 0x54], 0
call fcn.00430799
add esp, 8
mov dword [ebp - 0x54], eax
push esi
push edi
push eax
call fcn.004304e9
mov ecx, dword [ebp - 0x54]
add esp, 0xc
mov byte [esi + ecx], 0
push 0x45496c
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 1
call fcn.004147e0
lea edx, [ebp - 0x17c]
push edx
lea eax, [ebp - 0x54]
call fcn.004147e0
test byte [ebp - 0x78], 0x10
je 0x41feec
mov eax, dword [ebp - 0x54]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [ebp - 0x188]
test eax, eax
jne 0x41ff02
mov dword [0x464878], 0x10000
jmp 0x41ff25
cmp dword [eax], 1
je 0x41ff13
mov dword [0x464878], 0x80000
jmp 0x41ff25
mov edx, dword [ebp - 0x54]
mov ecx, dword [eax + 4]
push edx
push ebx
call fcn.00425d80
mov dword [0x464878], eax
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x41ff41
mov ecx, dword [ebp - 0x54]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [ebp - 0x184]
mov eax, dword [edx + 0x98]
test eax, eax
je 0x41ff60
push 0
push ebx
push 0x52d
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x54]
lea ecx, [ebp - 0x50]
cmp eax, ecx
je 0x41ff77
push eax
call fcn.0042f7b1
add esp, 4
inc ebx
cmp ebx, dword [ebp + 8]
jl 0x41fe10
mov edi, dword [ebp - 0x184]
mov eax, dword [edi + 0x98]
test eax, eax
je 0x41ffa1
push 0
push 0
push 0x52e
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [ebp + 0xc]
lea edx, [ebp + 0x10]
cmp eax, edx
je 0x41ffb4
push eax
call fcn.0042f7b1
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ed1f
mov esp, ebp
pop ebp
ret 0x48
Function at 0x4210a0
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44d503
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x46166c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [edi]
lea eax, [ebp - 0x94]
mov dword [ebp - 0x98], eax
push ecx
or eax, 0xffffffff
lea esi, [ebp - 0x98]
mov byte [ebp - 0x94], 0
call fcn.004148e0
push 0x45496c
mov eax, esi
mov dword [ebp - 4], 0
call fcn.004147e0
push str.BYYBShell.dll
mov eax, esi
call fcn.004147e0
mov eax, dword [edi]
lea edx, [ebp - 0x50]
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x54]
mov dword [ebp - 0x54], edx
mov byte [ebp - 0x50], 0
call fcn.004148e0
push 0x45496c
mov eax, esi
mov byte [ebp - 4], 1
call fcn.004147e0
lea ecx, [ebp - 0xbc]
test ecx, ecx
je 0x421174
push str.GetNativeSystemInfo
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x421167
lea edx, [ebp - 0xbc]
push edx
call eax
jmp 0x421174
lea eax, [ebp - 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ax, word [ebp - 0xbc]
cmp ax, 9
je 0x421187
cmp ax, 6
jne 0x42118e
push str.BYYBShell64.dll
jmp 0x421193
push str.BYYBShell32.dll
lea eax, [ebp - 0x54]
call fcn.004147e0
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0x54]
push ecx
push edx
call fcn.00431ce6
mov eax, dword [ebp - 0x54]
lea ecx, [ebp - 0x50]
add esp, 8
cmp eax, ecx
je 0x4211c1
push eax
call fcn.0042f7b1
add esp, 4
mov eax, dword [ebp - 0x98]
lea edx, [ebp - 0x94]
cmp eax, edx
je 0x4211da
push eax
call fcn.0042f7b1
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ed1f
mov esp, ebp
pop ebp
ret
Function at 0x421200
Capabilities:
Create process on windows
Create service
Persist via windows service
Read .ini file
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x178
mov eax, dword [0x46166c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebx]
push esi
push edi
push str.BianYaSrv.exe
push ecx
lea eax, [ebp - 0x130]
push str._s_s
lea edi, [ebp - 0x134]
mov dword [ebp - 0x134], eax
mov byte [ebp - 0x130], 0
call fcn.00414dd0
add esp, 0xc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edx, dword [ebp - 0x134]
push 0
push 0
push 0
push 0
push 0
push edx
push 1
push 2
push 0x10
push 0xf01ff
push str.BYYBSrv
mov esi, eax
push str.BYYBSrv
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
push 0
mov edi, eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push esi
call edi
mov ecx, dword [ebx]
push str.BYYB.exe
push ecx
lea eax, [ebp - 0xec]
push str._s_s
lea edi, [ebp - 0xf0]
mov dword [ebp - 0xf0], eax
mov byte [ebp - 0xec], 0
call fcn.00414dd0
mov edx, dword [ebp - 0xf0]
add esp, 0xc
push 5
push edx
call dword [sym.imp.KERNEL32.dll_WinExec]
mov ecx, dword [ebx]
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xac], eax
push ecx
or eax, 0xffffffff
lea esi, [ebp - 0xac]
mov byte [ebp - 0xa8], 0
call fcn.004148e0
push str.DataSysConfig.ini
mov eax, esi
call fcn.004147e0
mov edx, dword [ebp - 0xac]
push edx
push 0x63
lea eax, [ebp - 0x68]
push eax
push 0x454939
push str.RunSetup
push str.SysConfig
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x68]
lea esi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x421330
sub eax, esi
je 0x421390
mov eax, dword [ebx]
lea edx, [ebp - 0x68]
push edx
push eax
lea ecx, [ebp - 0x174]
push str._s_s
lea edi, [ebp - 0x178]
mov dword [ebp - 0x178], ecx
mov byte [ebp - 0x174], 0
call fcn.00414dd0
mov ecx, dword [ebp - 0x178]
add esp, 0xc
push 5
push ecx
call dword [sym.imp.KERNEL32.dll_WinExec]
mov eax, dword [ebp - 0x178]
lea edx, [ebp - 0x174]
cmp eax, edx
je 0x421390
push eax
call fcn.0042f7b1
add esp, 4
mov eax, dword [ebp - 0xac]
lea ecx, [ebp - 0xa8]
pop edi
pop esi
cmp eax, ecx
je 0x4213ab
push eax
call fcn.0042f7b1
add esp, 4
mov eax, dword [ebp - 0xf0]
lea edx, [ebp - 0xec]
cmp eax, edx
je 0x4213c4
push eax
call fcn.0042f7b1
add esp, 4
mov eax, dword [ebp - 0x134]
lea ecx, [ebp - 0x130]
cmp eax, ecx
je 0x4213dd
push eax
call fcn.0042f7b1
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov al, 1
call fcn.0042ed1f
mov esp, ebp
pop ebp
ret

Function at 0x4217f0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp byte [esi + 8], 0
mov dword [esi], vtable.ArkThread.0
je 0x421822
cmp byte [esi + 9], 0
jne 0x421822
mov eax, dword [esi + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esi + 9], 1
test byte [ebp + 8], 1
je 0x421831
push esi
call fcn.0042f0d0
add esp, 4
mov eax, esi
pop esi
pop ebp
ret 4
Function at 0x421840
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45027b
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x46166c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push 0xa0
call fcn.0042f140
add esp, 4
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x42188b
push eax
call fcn.0041f830
jmp 0x42188d
xor eax, eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
mov dword [ebx + 0x14], eax
mov edx, dword [ecx]
sub esp, 0x44
mov dword [eax + 0x98], edx
mov esi, esp
lea eax, [esi + 4]
mov dword [esi], eax
mov byte [eax], 0
mov eax, dword [ecx + 4]
mov dword [ebp + 8], esp
push eax
or eax, 0xffffffff
call fcn.004148e0
mov ecx, dword [ebx + 0x14]
call fcn.0041f8d0
mov edi, dword [ebx + 0x14]
mov esi, dword [edi]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4218d0
sub eax, edx
je 0x421915
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4218f4
mov ecx, dword [edi]
push 0
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
mov ecx, dword [edi]
sub esp, 0x44
mov esi, esp
lea eax, [esi + 4]
mov dword [ebp + 8], esp
mov dword [esi], eax
mov byte [eax], 0
push ecx
or eax, 0xffffffff
call fcn.004148e0
push edi
call fcn.0041fc30
mov esi, dword [ebx + 0x14]
test esi, esi
je 0x421921
call fcn.004012c0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4