joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ecece
Capabilities:
Set thread local storage value

Disassembly:
push esi
push 0x188
push 8
push dword [0xd92724]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
push dword [0xd93cf8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [esp + 8]
mov dword [0xd93cfc], esi
and dword [esi + 0xa8], 0
or dword [esi + 0xac], 0xffffffff
or dword [esi + 0xb0], 0xffffffff
push esi
mov dword [esi + 0xa4], 0xffffff
mov dword [esi + 0x74], 2
mov dword [esi + 0x78], 0x3f
call fcn.0051e0e9
mov dword [esi + 0x58], 0x4ee0fc
mov eax, esi
mov dword [esi + 0x5c], 0x4ee148
mov dword [esi + 0x10], fcn.004ed035
mov dword [esi + 0x30], 0x4ed1c1
mov dword [esi + 0x64], 0x4ed3d8
mov dword [esi + 0x60], 0x4ed430
mov dword [esi + 0x34], 0x4eda6a
mov dword [esi + 0x24], 0x4ed91c
mov dword [esi + 0x28], 0x4ed945
mov dword [esi + 0x2c], 0x4ed970
mov dword [esi + 0x44], 0x4edef1
mov dword [esi + 0x68], 0x4ecfc0
mov dword [esi + 0x6c], 0x4ed01f
pop esi
ret 4
Function at 0x4ef5d4
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
xor edi, edi
call dword [sym.imp.USER32.dll_GetFocus]
mov ebp, dword [esp + 0x3c]
mov ebx, eax
and dword [esp + 0x10], edi
push str.PB_WindowID
push ebp
call dword [sym.imp.USER32.dll_GetPropW]
mov esi, eax
push 9
pop eax
test esi, esi
je 0x4ef66a
lea eax, [esp + 0x14]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x4ef667
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x14], eax
jne 0x4ef667
lea eax, [esi - 1]
push eax
push dword [0xd93ba4]
call fcn.0048ac51
mov edi, eax
mov dword [esp + 0x10], 1
xor eax, eax
push 9
cmp dword [edi + 0x10], eax
jle 0x4ef669
mov ecx, dword [edi + 4]
add ecx, 4
pop esi
cmp word [ecx - 2], si
jne 0x4ef657
mov edx, 0xfa01
cmp word [ecx], dx
je 0x4ef662
inc eax
add ecx, 6
cmp eax, dword [edi + 0x10]
jl 0x4ef647
jmp 0x4ef667
and dword [esp + 0x10], 0
push 9
pop eax
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
test ebx, ebx
je 0x4ef710
push eax
call esi
test al, al
jns 0x4ef710
push 0x11
call esi
test al, al
js 0x4ef710
push 0x10
call esi
test al, al
js 0x4ef710
push 0x12
call esi
test al, al
js 0x4ef710
push 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
cmp dword [esp + 0x10], 0
jne 0x4ef710
push 5
lea eax, [esp + 0x1c]
push str.RichE
push eax
call fcn.004f89f8
add esp, 0xc
test eax, eax
je 0x4ef6e4
push 4
lea eax, [esp + 0x1c]
push str.RICHE
push eax
call fcn.004f89f8
add esp, 0xc
test eax, eax
jne 0x4ef6fb
push 0
push 0
push 0x44e
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, 0x800
je 0x4ef751
lea eax, [esp + 0x18]
push str.Scintilla
push eax
call fcn.004ae194
pop ecx
pop ecx
test eax, eax
je 0x4ef751
test ebp, ebp
je 0x4ef734
push 0x11
call esi
test al, al
js 0x4ef72c
push 0x10
call esi
test al, al
js 0x4ef72c
push 0x12
call esi
test al, al
jns 0x4ef734
push 1
push ebp
call fcn.004ef875
test ebx, ebx
je 0x4ef748
push str.PB_Hotkey
push ebx
call dword [sym.imp.USER32.dll_GetPropW]
test eax, eax
jne 0x4ef751
test edi, edi
je 0x4ef751
mov eax, dword [edi + 8]
jmp 0x4ef753
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 4
Function at 0x4efb40
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
cmp dword [ebx + 0x14], 0
jne 0x4efb62
push ebx
call fcn.004823c0
mov dword [ebx + 0x14], 1
mov dword [ebx + 0xc], 0
mov ebp, dword [ebx + 0xc]
mov ecx, dword [ebx + 4]
mov esi, dword [esp + 0x1c]
sub ecx, ebp
add ecx, dword [ebx + 0x10]
cmp ebp, esi
jl 0x4efbde
mov eax, esi
sub eax, 1
je 0x4efbca
sub eax, 1
je 0x4efbb4
sub eax, 2
je 0x4efba0
push esi
push ecx
push dword [esp + 0x20]
call fcn.004adc20
add esp, 0xc
mov eax, esi
sub dword [ebx + 0xc], esi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [ecx]
pop edi
mov dword [eax], ecx
mov eax, esi
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
mov cx, word [ecx]
pop edi
mov word [eax], cx
mov eax, esi
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov dl, byte [ecx]
mov eax, esi
mov ecx, dword [esp + 0x18]
pop edi
mov byte [ecx], dl
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
push ebp
push ecx
push eax
call fcn.004adc20
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [ebx + 8]
add eax, ebp
mov ecx, dword [ebx]
sub esi, ebp
mov dword [esp + 0x18], eax
push 0
cmp esi, edx
jl 0x4efc26
lea edx, [esp + 0x18]
push edx
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop edi
pop esi
add eax, ebp
mov dword [ebx + 0xc], 0
pop ebp
pop ebx
ret 0xc
lea eax, [esp + 0x18]
push eax
push edx
push dword [ebx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
cmp esi, eax
jle 0x4efc46
mov esi, eax
mov eax, dword [esp + 0x18]
push esi
push dword [ebx + 4]
push eax
call fcn.004adc20
sub dword [ebx + 0xc], esi
lea eax, [esi + ebp]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x4efc70
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push 0x1000
push 0
push dword [0xd92724]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x4efe00
mov cl, byte [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x4efcbe
test ebp, ebp
je 0x4efd66
dec ebp
cmp dword [ebx + 4], 0
lea edi, [ebx + 4]
je 0x4efcda
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.004efb40
mov dword [esp + 0x10], eax
jmp 0x4efcf4
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
mov cl, byte [esp + 0x24]
cmp eax, 1
jne 0x4efd69
test cl, cl
je 0x4efd08
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x24]
mov eax, dword [esp + 0x14]
mov edi, esi
mov edx, dword [esp + 0x1c]
dec eax
sub edi, edx
cmp edi, eax
jle 0x4efd43
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0xd92724]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x24]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [edi + edx]
test cl, cl
je 0x4efd66
cmp dword [esp + 0x28], 0
jne 0x4efcb0
cmp cl, 0xd
je 0x4efd72
cmp cl, 0xa
jne 0x4efcb0
dec esi
jmp 0x4efde3
lea edi, [ebx + 4]
cmp dword [esp + 0x28], 0
jne 0x4efde3
jmp 0x4efd75
lea edi, [ebx + 4]
cmp cl, 0xa
jne 0x4efd7d
dec esi
jmp 0x4efde3
cmp cl, 0xd
jne 0x4efde3
dec esi
cmp dword [edi], 0
je 0x4efd9b
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.004efb40
mov dword [esp + 0x10], eax
jmp 0x4efdb1
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x24], 0xa
je 0x4efde3
cmp dword [edi], 0
je 0x4efdc2
inc dword [ebx + 0xc]
jmp 0x4efde3
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x30]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
xor eax, eax
pop ebx
add esp, 0x10
ret 0x10
Function at 0x4efe10
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push 0x1000
push 0
push dword [0xd92724]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 8], edx
test edx, edx
je 0x4effcf
mov ax, word [esp + 0x1c]
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x18], 0x7ff
mov ecx, dword [esp + 0x30]
cmp ecx, 0xffffffff
je 0x4efe69
test ecx, ecx
je 0x4eff2c
dec ecx
mov dword [esp + 0x30], ecx
cmp dword [ebx + 4], 0
lea ebp, [ebx + 4]
je 0x4efe85
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.004efb40
mov dword [esp + 0x10], eax
jmp 0x4efe9f
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
cmp eax, 2
mov ax, word [esp + 0x28]
jne 0x4eff2f
test ax, ax
je 0x4efebd
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x28]
mov edx, dword [esp + 0x14]
mov esi, edi
mov ecx, dword [esp + 0x18]
sub esi, edx
sar esi, 1
cmp esi, ecx
jle 0x4eff04
mov eax, dword [esp + 0x1c]
add ecx, 0x800
add eax, 0x1000
mov dword [esp + 0x18], ecx
push eax
push edx
push 8
push dword [0xd92724]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
mov ax, word [esp + 0x28]
mov dword [esp + 0x14], edx
lea edi, [edx + esi*2]
test ax, ax
je 0x4eff2f
cmp dword [esp + 0x2c], 0
jne 0x4efe53
cmp ax, 0xd
je 0x4eff36
cmp ax, 0xa
jne 0x4efe53
sub edi, 2
jmp 0x4effae
lea ebp, [ebx + 4]
cmp dword [esp + 0x2c], 0
jne 0x4effae
cmp ax, 0xa
jne 0x4eff41
sub edi, 2
jmp 0x4effae
cmp ax, 0xd
jne 0x4effae
sub edi, 2
cmp dword [ebp], 0
je 0x4eff63
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.004efb40
mov dword [esp + 0x10], eax
jmp 0x4eff79
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x28], 0xa
je 0x4effae
cmp dword [ebp], 0
je 0x4eff8d
add dword [ebx + 0xc], 2
jmp 0x4effae
push 1
lea eax, [esp + 0x24]
mov dword [esp + 0x20], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, edi
sub ecx, dword [esp + 0x14]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
pop ebx
add esp, 0x14
ret 0x10
Function at 0x4effe0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0xd92724]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x4f0130
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x4f002c
test edi, edi
je 0x4f009d
dec edi
push esi
push ebp
call fcn.00525170
mov dword [esp + 0x20], eax
test eax, eax
jne 0x4f003f
xor cl, cl
jmp 0x4f0041
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x4f0084
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0xd92724]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x4f009d
test eax, eax
jne 0x4f0022
cmp cl, 0xd
je 0x4f00a1
cmp cl, 0xa
jne 0x4f0022
dec esi
jmp 0x4f0113
test eax, eax
jne 0x4f0113
cmp cl, 0xa
jne 0x4f00a9
dec esi
jmp 0x4f0113
cmp cl, 0xd
jne 0x4f0113
dec esi
cmp dword [ebp + 4], 0
je 0x4f00c8
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.004efb40
mov dword [esp + 0x20], eax
jmp 0x4f00df
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x4f0113
cmp dword [ebp + 4], 0
je 0x4f00f1
inc dword [ebp + 0xc]
jmp 0x4f0113
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x4f0140
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], 0
cmp dword [edi + 0x1c], 0
jne 0x4f0257
cmp dword [edi + 0x14], 1
push ebx
push ebp
jne 0x4f018d
mov eax, dword [edi + 0xc]
lea ecx, [esp + 0x10]
push 1
neg eax
cdq
push ecx
push eax
push dword [edi]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0xc], eax
mov eax, dword [edi + 0xc]
push esi
mov esi, dword [esp + 0x24]
cmp eax, esi
jle 0x4f0216
mov ecx, dword [edi + 4]
sub ecx, eax
mov eax, esi
add ecx, dword [edi + 8]
sub eax, 1
je 0x4f01ff
sub eax, 1
je 0x4f01e6
sub eax, 2
je 0x4f01cf
push esi
push dword [esp + 0x24]
push ecx
call fcn.004adc20
add esp, 0xc
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov ax, word [eax]
mov word [ecx], ax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov al, byte [eax]
mov byte [ecx], al
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
push edi
call fcn.004823c0
mov eax, dword [edi + 8]
cmp esi, eax
jl 0x4f0245
push 0
lea eax, [esp + 0x20]
push eax
push esi
push dword [esp + 0x2c]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov ecx, dword [edi + 4]
sub ecx, dword [edi + 0xc]
push esi
push dword [esp + 0x24]
add ecx, eax
jmp 0x4f01b7
xor eax, eax
pop edi
add esp, 8
ret 0xc

Function at 0x4f0fdf
Capabilities:
Hash data using sha256

Disassembly:
mov eax, dword [esp + 4]
push 0x20
pop ecx
push ecx
and dword [eax + 0x40], 0
and dword [eax + 0x44], 0
mov dword [eax + 0x68], ecx
add eax, 0x48
push 0x556ec0
push eax
call fcn.004adc20
add esp, 0xc
ret
Function at 0x4f2873
Capabilities:
Hash data using sha384

Disassembly:
mov eax, dword [esp + 4]
push 0x40
push 0x5571c0
and dword [eax + 0x80], 0
and dword [eax + 0x84], 0
mov dword [eax + 0xc8], 0x30
add eax, 0x88
push eax
call fcn.004adc20
add esp, 0xc
ret

Function at 0x4f28a5
Capabilities:
Hash data using sha512

Disassembly:
mov eax, dword [esp + 4]
push 0x40
pop ecx
push ecx
and dword [eax + 0x80], 0
and dword [eax + 0x84], 0
mov dword [eax + 0xc8], ecx
add eax, 0x88
push 0x557180
push eax
call fcn.004adc20
add esp, 0xc
ret
Function at 0x4f5fe9
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 4]
test edx, edx
jne 0x4f5ffa
mov eax, dword [esp + 0xc]
jmp 0x4f60dc
mov ecx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
not ecx
cmp esi, 8
jb 0x4f60bb
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
sub edi, 1
jne 0x4f6014
pop edi
test esi, esi
je 0x4f60d7
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x571bd0]
inc edx
sub esi, 1
jne 0x4f60bf
not ecx
mov eax, ecx
pop esi
ret 0xc
Function at 0x4f6150
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x94
test dword [esp + 0xa0], 0x10000
je 0x4f62e2
push ebx
mov ebx, dword [esp + 0x9c]
test ebx, ebx
je 0x4f62e1
mov eax, dword [ebx]
cdq
push ebp
mov ebp, dword [ebx + 4]
and edx, 7
push esi
add eax, edx
push edi
mov edi, dword [esp + 0xb4]
sar eax, 3
mov dword [esp + 0x10], eax
test edi, edi
jne 0x4f619c
mov edi, 0x581684
mov eax, dword [esp + 0xb8]
cmp eax, 0x18
jne 0x4f61c0
push edi
call fcn.004afdf0
mov edi, eax
mov esi, edi
lea eax, [esi + 1]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x4f61b5
sub esi, eax
jmp 0x4f61f9
cmp eax, 0x19
jne 0x4f61e3
mov esi, edi
lea ecx, [esi + 2]
lea ebx, [ebx]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4f61d0
sub esi, ecx
sar esi, 1
add esi, esi
jmp 0x4f61f9
push edi
call fcn.00494470
mov edi, eax
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4f61f0
sub esi, ecx
push esi
push edi
cmp esi, ebp
jle 0x4f624c
mov esi, dword [esp + 0xb4]
push ebx
mov eax, dword [esi + 0xc]
call eax
mov eax, dword [esi + 0x10]
push ebx
call eax
mov esi, dword [esp + 0x10]
lea eax, [ebx + 8]
push esi
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004adc20
mov eax, ebp
sub eax, esi
push eax
lea eax, [esp + 0x24]
add eax, esi
push 0
push eax
call fcn.00494140
mov eax, dword [esp + 0xc4]
add esp, 0x18
mov eax, dword [eax + 8]
push 1
push ebx
call eax
jmp 0x4f626c
lea eax, [esp + 0x1c]
push eax
call fcn.004adc20
mov eax, ebp
sub eax, esi
push eax
lea eax, [esp + 0x24]
add eax, esi
push 0
push eax
call fcn.00494140
add esp, 0x18
push ebp
lea eax, [esp + 0x18]
push eax
lea esi, [ebx + 0x48]
push esi
call fcn.004adc20
add esp, 0xc
test ebp, ebp
jle 0x4f62a1
lea eax, [esp + 0x14]
mov ecx, ebp
jmp 0x4f6290
xor byte [eax], 0x36
lea eax, [eax + 1]
xor byte [esi], 0x5c
lea esi, [esi + 1]
sub ecx, 1
jne 0x4f6290
push ebp
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0xb4]
push ebx
mov eax, dword [eax + 0xc]
call eax
mov eax, dword [esp + 0xb8]
cmp eax, 0x18
jne 0x4f62d3
push edi
call fcn.00494500
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14
cmp eax, 0x19
je 0x4f62de
push edi
call fcn.00494500
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14
Function at 0x4f77e4
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0050b1d0
mov eax, dword [0xd91f48]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0050c806
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4f7826
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4f7982
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00515ed0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0xd94c10]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00525cab
mov ecx, dword [esi*4 + 0xd94c10]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x4f797b
cmp eax, dword [ecx + edi + 0x24]
jne 0x4f797b
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4f797b
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00525cab
add esp, 0x14
test edx, edx
jl 0x4f797b
jg 0x4f78f1
test eax, eax
jb 0x4f797b
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4f797b
jl 0x4f790b
cmp dword [ebp - 0x1008], eax
ja 0x4f797b
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4f7929
test ebx, ebx
je 0x4f7962
cmp ecx, edi
jae 0x4f7962
mov al, byte [ecx]
cmp al, 0xd
jne 0x4f7943
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4f794f
cmp byte [ecx + 1], 0xa
jne 0x4f794f
inc ecx
jmp 0x4f794f
movzx eax, al
movsx eax, byte [eax + 0xd91f90]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4f7929
cmp edx, ebx
jne 0x4f7929
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4f7980
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0050c83a
leave
ret

Function at 0x4f7de0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x4f7e18
push 0
lea ecx, [esp + 0x10]
push ecx
push esi
push dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4f7e13
xor eax, eax
cmp dword [esp + 0xc], esi
pop edi
sete al
pop esi
ret
pop edi
xor eax, eax
pop esi
ret
mov eax, dword [edi + 4]
add eax, dword [edi + 8]
push esi
push dword [esp + 0x14]
push eax
call fcn.004adc20
add dword [edi + 8], esi
add esp, 0xc
mov eax, 1
pop edi
pop esi
ret
Function at 0x4f8ad0
Capabilities:
Get thread local storage value

Disassembly:
push dword [0xd91268]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
add eax, dword [esp + 4]
ret 4

Function at 0x4f8c08
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0xd9495c], 0
push ebx
push esi
mov esi, 0xd94964
jne 0x4f8c34
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0xd9497c], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0xd9495c], 1
push dword [0xd9497c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x4f8cd1
push 0x14
push 8
push dword [0xd92724]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x4f8cfb
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0xd94960]
test eax, eax
je 0x4f8c76
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0xd94960], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x4f8d7e
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0xd9497c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0xd92724]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4f8cfb
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8