joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405c50
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push esi
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x14]
push edi
mov dword [ebp - 0x14], 2
mov dword [ebp - 8], eax
call fcn.00405ba0
mov ecx, dword [0x468768]
lea edx, [ebp - 0x14]
push 0
mov edi, eax
call fcn.004325d0
add esp, 4
mov esi, eax
test edi, edi
je 0x405c97
mov ecx, edi
call fcn.004313b0
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x408ff0
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov eax, dword [esi + 8]
mov dword [esi + 4], 0
test eax, eax
je 0x409039
xor ecx, ecx
sub eax, ecx
push ebx
push eax
mov eax, dword [esi]
add eax, ecx
push 1
push eax
call fcn.0043d8ec
push ebx
mov edi, eax
call fcn.0043861a
add esp, 0x14
test eax, eax
jne 0x40907b
test edi, edi
je 0x409039
mov ecx, dword [esi + 4]
add ecx, edi
mov dword [esi + 4], ecx
mov eax, dword [esi + 8]
cmp ecx, eax
jb 0x409007
mov eax, dword [esi + 4]
xor edi, edi
cmp eax, dword [esi + 8]
jne 0x409057
push ebx
call fcn.004390d5
add esp, 4
mov ecx, 1
cmp eax, 0xffffffff
cmovne edi, ecx
mov ecx, dword [esi]
mov eax, edi
mov edx, dword [esi + 4]
add esi, 0xc
mov dword [esi], ecx
mov dword [esi + 8], edx
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], esi
pop edi
pop esi
pop ebx
ret
pop edi
pop esi
mov eax, 2
pop ebx
ret

Function at 0x40be00
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, ecx
mov dword [ebp - 0xc], 0xc
test dl, dl
mov dword [ebp - 4], 0
mov ecx, 0x40080003
mov eax, dword [esi]
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0x1000
push 0x1000
push 0xff
push 8
mov eax, 0x40000003
cmovne eax, ecx
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
pop esi
setne al
mov esp, ebp
pop ebp
ret
Function at 0x40be80
Capabilities:
Connect pipe

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov al, dl
mov ebx, ecx
push edi
mov byte [ebp - 1], al
nop
test al, al
je 0x40be9a
mov byte [ebp - 1], 0
jmp 0x40bec7
lea eax, [ebx + 0x10]
push eax
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40bec7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x3e5
je 0x40bf3a
test edi, edi
je 0x40bec7
cmp edi, 0x217
jne 0x40bf03
mov eax, dword [ebx + 0x28]
mov edi, dword [ebx + 0xc]
push edi
push 0x40be60
mov ecx, dword [eax]
push eax
mov eax, dword [ecx + 0x10]
call eax
add esp, 0xc
test eax, eax
je 0x40bee9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor dl, dl
mov ecx, ebx
call fcn.0040be00
test al, al
je 0x40befb
mov al, byte [ebp - 1]
jmp 0x40be90
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, edi
call fcn.00430940
push eax
push str.Error_while_listening_to_named_pipe:__s
call fcn.00431ba0
mov ecx, dword [ebx + 8]
mov esi, eax
call fcn.0040c810
mov ecx, dword [ebx + 0x28]
push edi
push esi
push 0
mov edx, dword [ecx]
push eax
push 1
push ecx
mov eax, dword [edx]
call eax
add esp, 0x20
mov ecx, esi
call fcn.00431540
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40dfa0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, edx
mov esi, ecx
push 0
mov edx, 0x102c
mov ecx, 1
call fcn.004314b0
add esp, 4
mov ebx, eax
push 0
push 0
push 0
mov dword [ebx + 4], esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
mov dword [ebx], 0
call esi
cmp dword [0x467b2c], 0xffffffff
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x1028], edi
mov word [ebx + 0x15], 0
mov byte [ebx + 0x14], 0
mov dword [ebx + 0x1c], eax
jne 0x40e041
push 0x468e40
mov dword [0x468e38], 0x468e38
mov dword [0x468e3c], 0x468e38
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push 0
push 0
push 0
call esi
push 0
mov edx, 0x40df50
mov dword [0x467b2c], eax
mov ecx, eax
call fcn.004050d0
add esp, 4
lea eax, [ebp - 4]
push eax
push 0
lea eax, [ebx + 4]
push eax
push 0x40db50
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x40e065
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
mov byte [ebx + 0x17], 1
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40e080
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, ecx
mov edx, 0x102c
push 0
mov ecx, 1
call fcn.004314b0
add esp, 4
mov edi, eax
lea ebx, [edi + 4]
mov dword [ebx], esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 0
push 0
mov dword [edi], 1
call esi
mov dword [edi + 0x10], eax
lea ecx, [edi + 0x30]
mov eax, dword [ebp + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], eax
call fcn.00432ef0
cmp dword [0x467b2c], 0xffffffff
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0x40e600
mov dword [edi + 0x4c], edi
mov dword [edi + 0x1c], eax
jne 0x40e131
push 0x468e40
mov dword [0x468e38], 0x468e38
mov dword [0x468e3c], 0x468e38
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0
push 0
push 0
push 0
call esi
push 0
mov edx, 0x40df50
mov dword [0x467b2c], eax
mov ecx, eax
call fcn.004050d0
add esp, 4
lea eax, [ebp - 4]
push eax
push 0
push ebx
push 0x40dd20
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x40e152
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40e3a0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 9
mov esi, ecx
mov dword [ebp - 4], edx
push str..pipe_
push esi
call fcn.0043d3a0
add esp, 0xc
test eax, eax
je 0x40e3d6
push 0x16
push str.C:Usersomahr_source_reposputty_caccodewindows_named_pipe_client.c
push str.strncmp_pipename___.pipe___9___0
call fcn.004384d4
add esp, 0xc
lea eax, [esi + 9]
push 0x5c
push eax
call fcn.00434620
add esp, 8
test eax, eax
je 0x40e3fc
push 0x17
push str.C:Usersomahr_source_reposputty_caccodewindows_named_pipe_client.c
push str.strchr_pipename__9_____NULL
call fcn.004384d4
add esp, 0xc
push 0
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40e458
call ebx
cmp eax, 0xe7
jne 0x40e4a3
push 0
push esi
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
je 0x40e491
push 0
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40e422
call fcn.0042fc80
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x40e4ca
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
mov ecx, eax
call fcn.00430940
push eax
push str.Unable_to_get_user_SID:__s
call fcn.00431ba0
mov ecx, dword [ebp - 4]
add esp, 8
mov dword [ecx], eax
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call ebx
mov ecx, eax
call fcn.00430940
push eax
push esi
push str.Error_waiting_for_named_pipe__s:__s
jmp 0x40e4b3
call ebx
mov ecx, eax
call fcn.00430940
push eax
push esi
push str.Unable_to_open_named_pipe__s:__s
call fcn.00431ba0
mov ecx, dword [ebp - 4]
add esp, 0xc
mov dword [ecx], eax
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x10]
push eax
push 1
push 6
push edi
call dword [0x4690e8]
test eax, eax
je 0x40e502
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
mov ecx, eax
call fcn.00430940
push eax
push str.Unable_to_get_named_pipe_security_information:__s
jmp 0x40e47a
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x40e52d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
push str.Owner_of_named_pipe__s_is_not_us
jmp 0x40e47a
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410710
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
xor eax, eax
cmp edx, 2
push 4
sete al
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 4
push ecx
push str.SoftwareSimonTathamPuTTY
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
mov esp, ebp
pop ebp
ret

Function at 0x4122d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov esi, ecx
mov edi, edx
mov eax, dword [esi]
cmp eax, dword [edi]
je 0x4122f6
push 0xa6
push str.C:Usersomahr_source_reposputty_caccodecryptompint.c
push str.x0__nw__x1__nw
call fcn.004384d4
add esp, 0xc
mov eax, dword [ebp + 8]
xor edx, edx
and eax, 1
neg eax
mov dword [ebp + 8], eax
cmp dword [esi], edx
jbe 0x412329
mov eax, dword [esi + 4]
mov ecx, dword [edi + 4]
mov eax, dword [eax + edx*4]
xor eax, dword [ecx + edx*4]
mov ecx, dword [ebp + 8]
and ecx, eax
mov eax, dword [esi + 4]
xor dword [eax + edx*4], ecx
mov eax, dword [edi + 4]
xor dword [eax + edx*4], ecx
inc edx
cmp edx, dword [esi]
jb 0x412307
pop edi
pop esi
pop ebp
ret

Function at 0x412500
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
cmp ebx, 0x3fffffff
jbe 0x41252b
push 0x106
push str.C:Usersomahr_source_reposputty_caccodecryptompint.c
push str.hex.len_____size_t_0____4
call fcn.004384d4
add esp, 0xc
lea eax, [ebx*4 + 0x1f]
mov ecx, 1
shr eax, 5
cmp eax, ecx
cmova ecx, eax
call fcn.00412140
xor edx, edx
mov esi, eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], edx
test ebx, ebx
je 0x4125cd
mov eax, dword [ebp + 8]
dec eax
add eax, ebx
mov dword [ebp - 8], eax
nop dword [eax + eax]
movsx edi, byte [eax]
mov ebx, 0x66
mov ecx, dword [ebp - 4]
sub ebx, edi
shr edx, 3
and ecx, 7
shl ecx, 2
lea eax, [edi - 0x61]
or ebx, eax
lea eax, [edi - 0x57]
xor eax, edi
shr ebx, 0x1f
dec ebx
and ebx, eax
mov eax, dword [esi + 4]
xor ebx, edi
lea esi, [eax + edx*4]
mov edx, 0x46
sub edx, edi
lea eax, [edi - 0x41]
or edx, eax
lea eax, [edi - 7]
shr edx, 0x1f
xor eax, ebx
dec edx
and edx, eax
mov eax, dword [ebp - 8]
xor edx, ebx
dec eax
and edx, 0xf
mov dword [ebp - 8], eax
shl edx, cl
or dword [esi], edx
mov edx, dword [ebp - 4]
mov esi, dword [ebp - 0xc]
inc edx
mov dword [ebp - 4], edx
cmp edx, dword [ebp + 0xc]
jb 0x412560
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4127e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10
push esi
push edi
push 0
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0xffffffff
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x18], 0xffffffff
push eax
xor edx, edx
mov dword [esp + 0x20], 0
call fcn.004126d0
mov esi, dword [esp + 0x1c]
add esp, 0xc
xor edi, edi
mov ecx, 0x10
mov edx, esi
shr edx, cl
mov eax, edx
xor edx, esi
neg eax
shr eax, 0x1f
neg eax
and edx, eax
and eax, ecx
xor esi, edx
add edi, eax
shr ecx, 1
jne 0x412824
mov eax, dword [esp + 0xc]
shl eax, 5
inc eax
add eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x412850
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
mov eax, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push esi
test ebx, ebx
je 0x412893
mov esi, ebx
mov edx, eax
nop dword [eax + eax]
movzx ecx, byte [edx + esi - 1]
dec esi
xor ecx, 0x30
mov eax, esi
dec ecx
xor eax, ebx
shr ecx, 0x1f
dec ecx
and ecx, eax
xor ebx, ecx
test esi, esi
jne 0x412870
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov dword [ebp + 8], ebx
xor ecx, ecx
mov dword [ebp - 0xc], ecx
test edx, edx
je 0x4128f6
push edi
nop dword [eax]
shr ebx, cl
mov edi, 1
and bl, 1
shl edi, cl
neg bl
cmp edi, edx
jae 0x4128e3
mov esi, eax
add eax, edi
sub edi, dword [ebp - 4]
nop dword [eax]
mov dl, byte [esi]
lea esi, [esi + 1]
mov cl, byte [eax]
lea eax, [eax + 1]
xor cl, dl
and cl, bl
xor dl, cl
mov byte [esi - 1], dl
xor byte [eax - 1], cl
lea ecx, [edi + esi]
mov edx, dword [ebp - 8]
cmp ecx, edx
jb 0x4128c0
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp + 8]
inc ecx
mov eax, edx
mov dword [ebp - 0xc], ecx
shr eax, cl
test eax, eax
mov eax, dword [ebp - 4]
jne 0x4128a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x413fb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x94], edx
push edi
mov dword [ebp - 0x9c], esi
mov dword [ebp - 0xa0], ebx
call fcn.00413eb0
mov ecx, eax
call fcn.00412600
mov ebx, dword [ebp - 0x94]
mov edi, 1
mov dword [ebp - 0x8c], eax
nop word [eax + eax]
mov edx, dword [ebp + edi*4 - 0x90]
mov ecx, esi
push ebx
call fcn.00413e80
mov dword [ebp + edi*4 - 0x8c], eax
add esp, 4
inc edi
cmp edi, 0x20
jb 0x414000
mov ecx, dword [esi + 8]
call fcn.00412140
mov edi, eax
mov ecx, esi
mov dword [ebp - 0xa4], edi
call fcn.00413eb0
mov edx, eax
mov ecx, edi
call fcn.00412220
mov ecx, dword [esi + 8]
call fcn.00412140
mov ebx, dword [ebp - 0xa0]
mov dword [ebp - 0x94], eax
mov eax, 0xcccccccd
mov byte [ebp - 0x8d], 1
mov ecx, dword [ebx]
shl ecx, 5
dec ecx
mul ecx
shr edx, 2
lea eax, [edx + edx*4]
xor ebx, ebx
mov dword [ebp - 0x98], eax
xor esi, esi
nop word [eax + eax]
mov ecx, dword [ebp - 0xa0]
lea edx, [esi + eax]
call fcn.00412640
mov ecx, esi
inc esi
shl eax, cl
or ebx, eax
mov eax, dword [ebp - 0x98]
cmp esi, 5
jb 0x414080
mov edi, dword [ebp - 0x94]
mov ecx, edi
mov edx, dword [ebp - 0x8c]
call fcn.00412220
mov esi, 1
nop dword [eax + eax]
mov edx, dword [ebp + esi*4 - 0x8c]
mov eax, esi
xor eax, ebx
mov ecx, edi
add eax, 0x1f
shr eax, 5
push eax
push edi
call fcn.00412260
inc esi
add esp, 8
cmp esi, 0x20
jb 0x4140c0
cmp byte [ebp - 0x8d], 0
mov edi, dword [ebp - 0xa4]
mov esi, dword [ebp - 0x94]
jne 0x41410e
mov ebx, dword [ebp - 0x9c]
mov edx, edi
push esi
push edi
mov ecx, ebx
call fcn.00413dc0
add esp, 8
jmp 0x414124
mov edx, esi
mov ecx, edi
call fcn.00412220
mov ebx, dword [ebp - 0x9c]
mov byte [ebp - 0x8d], 0
cmp dword [ebp - 0x98], 0
je 0x414153
mov esi, 5
push edi
push edi
mov edx, edi
mov ecx, ebx
call fcn.00413dc0
add esp, 8
sub esi, 1
jne 0x414132
mov eax, dword [ebp - 0x98]
sub eax, 5
jmp 0x41406d
xor ebx, ebx
nop word [eax + eax]
mov ecx, dword [ebp + ebx*4 - 0x8c]
call fcn.00412200
inc ebx
cmp ebx, 0x20
jb 0x414160
mov ecx, esi
call fcn.00412200
mov esi, dword [ebp - 0x9c]
mov ecx, dword [esi + 0x20]
call fcn.00412330
mov ecx, dword [ebp - 8]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004339c8
mov esp, ebp
pop ebp
ret
Function at 0x416c10
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
imul esi, dword [ebp + 8], 0x3e8
mov eax, 0x10624dd3
mov dword [ebp - 4], edx
mov ebx, 1
push edi
mov dword [ebp - 8], ecx
mul esi
mov esi, ebx
shr edx, 6
mov dword [ebp + 8], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push dword [ebp + 0x38]
mov edx, dword [ebp - 4]
mov edi, eax
push dword [ebp + 0x34]
mov ecx, dword [ebp - 8]
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ebx
call fcn.00416bc0
add esp, 0x30
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [ebp + 8]
jae 0x416cdd
nop
mov eax, esi
mov edi, esi
not eax
cmp ebx, eax
ja 0x416cdd
mov ecx, dword [ebp + 0x18]
xor edx, edx
call fcn.00431240
add esi, ebx
mov ebx, edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push dword [ebp + 0x38]
mov edx, dword [ebp - 4]
mov edi, eax
push dword [ebp + 0x34]
mov ecx, dword [ebp - 8]
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
call fcn.00416bc0
add esp, 0x30
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [ebp + 8]
jb 0x416c80
mov eax, dword [ebp + 0xc]
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x41be40
Capabilities:
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
mov eax, str.SHA256
cmp edx, 2
push esi
sete bl
mov esi, str.SHA1
cmove esi, eax
mov dword [ebp - 0x14], esi
push edi
lea ebx, [ebx*8 + 0x8004]
cmp edx, 4
jne 0x41be79
mov ebx, 0x800e
mov dword [ebp - 0x14], str.SHA512
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea edx, [ebp - 0xc]
mov dword [ebp - 0xc], 0
call fcn.0041bd90
add esp, 4
cmp dword [ebp - 0x10], 0
je 0x41bfb9
mov edi, dword [ebp - 0xc]
test edi, edi
je 0x41bfb9
lea eax, [ebp - 8]
xor esi, esi
push eax
push esi
push 2
push edi
mov dword [ebp - 8], esi
call dword [sym.imp.CRYPT32.dll_CertGetCertificateContextProperty]
test eax, eax
je 0x41bf5f
mov ecx, dword [ebp - 8]
lea edx, [esi + 1]
push esi
call fcn.004314b0
add esp, 4
mov dword [ebp - 4], eax
lea ecx, [ebp - 8]
push ecx
push eax
push 2
push edi
call dword [sym.imp.CRYPT32.dll_CertGetCertificateContextProperty]
test eax, eax
je 0x41bf5f
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x18], esi
mov eax, dword [ecx + 0xc]
and eax, 0x20
push eax
push dword [ecx + 8]
lea eax, [ebp - 0xc]
push dword [ecx + 4]
push dword [ecx]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x41bf7a
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], esi
push eax
push esi
push esi
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
neg eax
sbb esi, esi
mov eax, dword [ebp - 0x14]
neg esi
test eax, eax
je 0x41bf37
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x41bf4a
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x41bf58
push eax
call dword [sym.imp.ncrypt.dll_NCryptFreeObject]
mov ecx, ebx
call fcn.00431540
push edi
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push 0
push dword [ebp - 0x10]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 4]
lea eax, [ebp - 0x18]
push 0
push dword [ebx + 4]
push eax
call dword [sym.imp.ncrypt.dll_NCryptOpenStorageProvider]
test eax, eax
jne 0x41bf3a
push eax
push eax
push dword [ebp - 0x14]
lea eax, [ebp - 4]
mov dword [ebp - 4], esi
push eax
call dword [sym.imp.ncrypt.dll_BCryptOpenAlgorithmProvider]
neg eax
sbb esi, esi
mov eax, dword [ebp - 4]
inc esi
test eax, eax
je 0x41bf3a
push 0
push eax
call dword [sym.imp.ncrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x41bf3a
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x41cce0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, edx
push 0x3a
push ecx
mov dword [edi], 0
mov dword [eax], 0
call fcn.00434620
push 0xfe
lea esi, [eax + 1]
xor eax, eax
push eax
mov word [ebp - 0x10c], ax
lea eax, [ebp - 0x10a]
push eax
call fcn.00434ed0
add esp, 0x14
lea eax, [ebp - 0x10c]
push 0x80
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x41cda2
lea eax, [ebp - 0x190]
mov dword [ebp - 0x190], 0x80
push eax
lea eax, [ebp - 0x18c]
push eax
push 0
push 8
lea eax, [ebp - 0x10c]
push eax
push str.SoftwareSimonTathamPuTTYFidoPubKeyBlobs
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x41cda2
mov edx, dword [ebp - 0x190]
lea eax, [ebp - 0x10c]
push edi
push eax
lea ecx, [ebp - 0x18c]
call fcn.0041ca40
add esp, 8
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.004339c8
mov esp, ebp
pop ebp
ret

Function at 0x41cdc0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x29c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x298], eax
push ebx
push esi
push edi
push 0
push 0x2000
push 0
push 0x10001
push 2
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov esi, eax
test esi, esi
jne 0x41ce0e
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.004339c8
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push 0x20019
push 0
push str.SoftwareSimonTathamPuTTYFidoPubKeyBlobs
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41cefe
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x1c], 0x100
push eax
xor edi, edi
lea eax, [esp + 0x20]
push edi
push edi
push eax
lea eax, [esp + 0xb4]
push eax
push edi
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, 0x103
je 0x41cef4
mov ebx, dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0xa4]
mov dword [esp + 0x20], 0
push eax
lea ecx, [esp + 0x28]
call fcn.0041ca40
add esp, 8
cmp eax, 1
jne 0x41ceb6
push 0
push 4
push dword [esp + 0x24]
push esi
call ebx
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x1c], 0x100
push eax
push 0
push 0
lea eax, [esp + 0x28]
inc edi
push eax
lea eax, [esp + 0xb4]
push eax
push edi
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, 0x103
jne 0x41ce81
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x2a4]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004339c8
mov esp, ebp
pop ebp
ret
Function at 0x424120
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], 0
mov edi, esi
mov dword [ebp - 4], 0
ror esi, 0x1c
xor edi, edx
xor esi, dword [ebp + 8]
mov ebx, edi
mov edx, esi
shr edi, 8
shr esi, 8
and edx, 0xfffcfffc
and esi, 0xfffcfffc
mov dword [ebp + 8], 0
and ebx, 0xfffcfffc
mov dword [ebp - 0xc], 0
and edi, 0xfffcfffc
mov dword [ebp - 0x10], 0x20
or edx, 0xff00ff00
or esi, 0xff00ff00
or ebx, 0xff00ff00
mov eax, 0x45a908
or edi, 0xff00ff00
mov ecx, dword [eax - 8]
lea eax, [eax + 0x10]
and ecx, edx
add edx, 0x80008
xor dword [ebp + 8], ecx
mov ecx, dword [eax - 0x14]
and ecx, esi
add esi, 0x80008
xor dword [ebp - 8], ecx
mov ecx, ebx
and ecx, dword [eax - 0x10]
add ebx, 0x80008
xor dword [ebp - 4], ecx
mov ecx, dword [eax - 0xc]
and ecx, edi
add edi, 0x80008
xor dword [ebp - 0xc], ecx
sub dword [ebp - 0x10], 1
jne 0x424197
mov eax, dword [ebp + 8]
and edx, 0x40004
mov ecx, dword [ebp - 4]
and ebx, 0x40004
imul edx, edx, 0x3c00
and esi, 0x40004
and edi, 0x40004
shr edx, 4
and edx, eax
shr eax, 4
xor edx, eax
imul eax, ebx, 0x3c00
shr edx, 4
and edx, 0xf000f0
shr eax, 4
and eax, ecx
shr ecx, 4
xor eax, ecx
mov ecx, dword [ebp - 8]
and eax, 0xf000f00
or edx, eax
imul eax, esi, 0x3c00
shr edx, 4
shr eax, 4
and eax, ecx
shr ecx, 4
xor eax, ecx
imul ecx, edi, 0x3c00
and eax, 0xf000f00
or edx, eax
mov eax, dword [ebp - 0xc]
shl eax, 4
pop edi
and ecx, eax
xor ecx, dword [ebp - 0xc]
and ecx, 0xf000f000
or edx, ecx
mov ecx, edx
shr ecx, 4
xor ecx, edx
and ecx, 0x7030702
mov eax, ecx
shl eax, 4
xor eax, ecx
xor edx, eax
mov ecx, edx
shr ecx, 8
xor ecx, edx
and ecx, 0x4e009e
mov eax, ecx
shl eax, 8
xor eax, ecx
xor edx, eax
mov ecx, edx
shr ecx, 0x10
xor ecx, edx
and ecx, 0xd9d3
mov eax, ecx
shl eax, 0x10
xor eax, ecx
xor edx, eax
mov ecx, edx
shr ecx, 4
xor ecx, edx
and ecx, 0x5040004
mov eax, ecx
shl eax, 4
xor eax, ecx
xor edx, eax
mov ecx, edx
shr ecx, 1
xor ecx, edx
and ecx, 0x4045015
pop esi
pop ebx
lea eax, [ecx + ecx]
xor eax, ecx
xor eax, edx
mov esp, ebp
pop ebp
ret