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

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ecx, esi
push edi
and ecx, 3
je 0x489493
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x76516c]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4894ca
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
push 8
push dword [0x6eb394]
mov dword [0x765170], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x765170]
call ebx
mov eax, dword [0x76516c]
mov edi, eax
add eax, esi
push eax
push dword [0x765170]
mov dword [0x76516c], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x6eb394]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x765170]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x48950a
test ebx, ebx
je 0x48952b
push 0x14
push 0x765168
call fcn.00489dc1
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x48952b
lea ecx, [edi + ebp]
push ecx
call esi
pop ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc

Function at 0x489f10
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x489f56
mov ecx, dword [ebp - 4]
add ecx, 0xa
push ecx
push 0
mov edx, dword [0x765f3c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x489f77
mov edx, dword [ebp - 4]
add edx, 0xa
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [0x765f3c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
shr edx, 1
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.0048a550
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8

Function at 0x48a040
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
add edx, 2
mov eax, dword [ebp - 4]
mov dword [eax + 8], edx
mov esp, ebp
pop ebp
ret

Function at 0x48a0a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
mov edx, dword [ebp - 4]
add eax, dword [edx + 8]
mov esp, ebp
pop ebp
ret
Function at 0x48a0d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.MSVCRT.dll_wcsncpy
add esp, 0xc
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0x10]
mov dword [edx + 8], eax
mov esp, ebp
pop ebp
ret 0xc

Function at 0x48a240
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x48a264
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
mov edx, dword [ebp + 8]
lea eax, [ecx + edx*2]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
sub edx, 4
cmp dword [ebp - 8], edx
jl 0x48a2b4
mov eax, dword [ebp - 8]
add eax, 0x4000
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
add eax, 0xa
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
push 0
mov eax, dword [0x765f3c]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
jmp 0x48a2fc
mov edx, dword [ebp - 4]
cmp dword [edx + 4], 0x100000
jle 0x48a2fc
cmp dword [ebp - 8], 0x100000
jge 0x48a2d0
mov dword [ebp - 8], 0x100000
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
add eax, 0xa
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
push 0
mov eax, dword [0x765f3c]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx*2]
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 8

Function at 0x48a320
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
shl ecx, 1
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
sub eax, ecx
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov esp, ebp
pop ebp
ret 4

Function at 0x48a4a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx]
jb 0x48a4de
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
cmp dword [ebp + 8], ecx
ja 0x48a4de
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub ecx, dword [eax]
add ecx, 1
mov eax, ecx
jmp 0x48a4e0
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x48a5a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
add eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret 4

Function at 0x48a930
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x6e7620]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 4

Function at 0x48a970
Capabilities:
Query environment variable

Disassembly:
push str.EXPAT_ENTROPY_DEBUG
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x48a9d4
mov ecx, 0x52bd30
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x48a9a7
test dl, dl
je 0x48a9a3
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x48a9a7
add eax, 2
add ecx, 2
test dl, dl
jne 0x48a987
xor eax, eax
jmp 0x48a9ac
sbb eax, eax
or eax, 1
test eax, eax
jne 0x48a9d4
push 4
push dword [esp + 0xc]
push 8
push dword [esp + 0x10]
push str.Entropy:__s_____0x_0lx___lu_bytes__n
call dword [sym.imp.MSVCRT.dll___p__iob]
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x18
mov eax, dword [esp + 8]
ret

Function at 0x48ed40
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
sub esp, 0xc
push esi
xor esi, esi
jmp 0x48ed50
push 4
lea eax, [esp + 8]
mov dword [esp + 8], 0
push eax
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x48eda1
mov edx, dword [esp + 4]
xor ecx, ecx
mov edi, edi
cmp esi, 4
jae 0x48ed8b
mov eax, edx
shr eax, cl
add ecx, 8
mov byte [esp + esi + 8], al
inc esi
cmp ecx, 0x20
jb 0x48ed70
cmp esi, 4
jb 0x48ed50
push dword [esp + 8]
push str.rand_s
call fcn.0048a970
add esp, 8
pop esi
add esp, 0xc
ret
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov esi, dword [esp + 8]
xor esi, dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor eax, esi
imul eax, eax, 0x7fffffff
push eax
push str.fallback_4_
call fcn.0048a970
add esp, 8
pop esi
add esp, 0xc
ret
Function at 0x492710
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
cmp dword [esp + 0x10], 0
jle 0x492812
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
mov ecx, dword [eax]
mov edx, dword [eax + 4]
push edi
jmp 0x492730
mov edi, dword [eax + 8]
add ecx, edi
mov esi, dword [eax + 0xc]
adc edx, esi
mov dword [eax], ecx
mov dword [eax + 4], edx
xor ecx, ecx
mov edx, esi
shld esi, edi, 0xd
shr edx, 0x13
or ecx, esi
shl edi, 0xd
mov esi, dword [eax]
or edx, edi
mov edi, dword [eax + 0x18]
mov dword [eax + 8], edx
xor dword [eax + 8], esi
mov edx, dword [eax + 4]
mov dword [eax + 0xc], ecx
xor ecx, ecx
xor dword [eax + 0xc], edx
or ecx, esi
add dword [eax + 0x10], edi
mov esi, dword [eax + 0x1c]
adc dword [eax + 0x14], esi
mov ebp, dword [eax + 0x10]
mov ebx, dword [eax + 0x14]
mov dword [eax], edx
mov edx, esi
shld esi, edi, 0x10
mov dword [eax + 4], ecx
xor ecx, ecx
or ecx, esi
shr edx, 0x10
shl edi, 0x10
or edx, edi
mov dword [eax + 0x1c], ecx
xor dword [eax + 0x1c], ebx
mov esi, dword [eax + 0x1c]
mov dword [eax + 0x18], edx
mov edx, esi
xor dword [eax + 0x18], ebp
mov edi, dword [eax + 0x18]
add dword [eax], edi
adc dword [eax + 4], esi
xor ecx, ecx
shld esi, edi, 0x15
shr edx, 0xb
or ecx, esi
shl edi, 0x15
mov esi, dword [eax + 0xc]
or edx, edi
mov edi, dword [eax + 8]
mov dword [eax + 0x18], edx
mov edx, dword [eax + 4]
mov dword [eax + 0x1c], ecx
xor dword [eax + 0x1c], edx
mov edx, esi
mov ecx, dword [eax]
xor dword [eax + 0x18], ecx
add ebp, edi
adc ebx, esi
xor ecx, ecx
shld esi, edi, 0x11
shr edx, 0xf
or ecx, esi
shl edi, 0x11
or edx, edi
mov dword [eax + 0xc], ecx
xor ecx, ecx
mov dword [eax + 8], edx
mov esi, ebp
mov edx, ebx
xor dword [eax + 0xc], edx
or ecx, esi
xor dword [eax + 8], esi
dec dword [esp + 0x20]
mov dword [eax + 0x10], edx
mov edx, dword [eax + 4]
mov dword [eax + 0x14], ecx
mov ecx, dword [eax]
jne 0x492730
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x4a9b10
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ecx
mov eax, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x14]
cmp esi, eax
jb 0x4a9b20
mov esi, eax
test esi, esi
je 0x4a9bb2
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x18]
sub ebp, ebx
mov dword [esp + 0x10], esi
lea ecx, [ecx]
mov eax, dword [edi + 8]
mov dl, byte [ebx + ebp]
or eax, 2
mov ecx, eax
mov byte [esp + 0x20], dl
xor ecx, 1
imul ecx, eax
lea eax, [esp + 0x20]
push 1
push eax
shr ecx, 8
xor cl, dl
mov byte [ebx], cl
mov eax, dword [edi]
not eax
push eax
call fcn.004a67e0
not eax
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [edi + 4], eax
mov al, byte [edi + 7]
mov byte [esp + 0x38], al
lea eax, [esp + 0x38]
push eax
mov eax, dword [edi + 8]
not eax
push eax
call fcn.004a67e0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [edi + 8], eax
dec esi
jne 0x4a9b40
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret
xor eax, eax
pop esi
pop ecx
ret

Function at 0x4a9bc0
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, dword [esp + 0x14]
mov dword [esi], 0x12345678
mov dword [esi + 4], 0x23456789
mov dword [esi + 8], 0x34567890
test edi, edi
je 0x4a9c45
push ebx
mov ebx, dword [esp + 0x14]
jmp 0x4a9bf0
movzx eax, byte [ebx]
mov byte [esp + 0x10], al
lea eax, [esp + 0x10]
push 1
push eax
mov eax, dword [esi]
not eax
push eax
call fcn.004a67e0
not eax
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
movzx eax, byte [esi + 7]
mov byte [esp + 0x28], al
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi + 8]
not eax
push eax
call fcn.004a67e0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [esi + 8], eax
dec edi
jne 0x4a9bf0
pop ebx
pop edi
xor eax, eax
pop esi
ret

Function at 0x4aca10
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [esp + 0x14]
push edi
mov edi, dword [esp + 0x10]
cmp edi, eax
jb 0x4aca1f
mov edi, eax
test edi, edi
je 0x4aca9d
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x14]
sub ebp, ebx
mov eax, dword [esi + 8]
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
lea eax, [esp + 0x1c]
push 1
push eax
shr ecx, 8
xor cl, byte [ebx + ebp]
mov byte [ebx], cl
mov eax, dword [esi]
not eax
mov byte [esp + 0x24], cl
push eax
call fcn.004a67e0
not eax
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
mov al, byte [esi + 7]
mov byte [esp + 0x34], al
lea eax, [esp + 0x34]
push eax
mov eax, dword [esi + 8]
not eax
push eax
call fcn.004a67e0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [esi + 8], eax
dec edi
jne 0x4aca34
pop esi
pop ebp
pop ebx
pop edi
ret
Function at 0x4acaa0
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
sub esp, 0x10
cmp dword [esp + 0x24], 0xc
jae 0x4acab8
mov eax, dword [esp + 0x28]
mov byte [eax], 0xff
or eax, 0xffffffff
add esp, 0x10
ret
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x24]
mov dword [esi], 0x12345678
mov dword [esi + 4], 0x23456789
mov dword [esi + 8], 0x34567890
test edi, edi
je 0x4acb35
push ebx
mov ebx, dword [esp + 0x24]
nop
movzx eax, byte [ebx]
mov byte [esp + 0x30], al
lea eax, [esp + 0x30]
push 1
push eax
mov eax, dword [esi]
not eax
push eax
call fcn.004a67e0
not eax
mov dword [esi], eax
movzx eax, al
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [esi + 4], eax
movzx eax, byte [esi + 7]
mov byte [esp + 0x1f], al
lea eax, [esp + 0x1f]
push eax
mov eax, dword [esi + 8]
not eax
push eax
call fcn.004a67e0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [esi + 8], eax
dec edi
jne 0x4acae0
pop ebx
push 0xc
lea eax, [esp + 0x10]
push eax
push 0xc
push dword [esp + 0x34]
push esi
call fcn.004aca10
mov ecx, dword [esp + 0x44]
add esp, 0x14
mov al, byte [esp + 0x17]
pop edi
mov byte [ecx], al
xor eax, eax
pop esi
add esp, 0x10
ret
Function at 0x4b3c50
Capabilities:
Terminate process

Disassembly:
push esi
push 0x24
push str.Fatal_Internal_Error_in_libarchive:
push 2
call fcn.004b9ea0
mov edx, dword [esp + 0x18]
add esp, 0xc
mov ecx, edx
lea esi, [ecx + 1]
jmp 0x4b3c70
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b3c70
sub ecx, esi
push ecx
push edx
push 2
call fcn.004b9ea0
push 1
push 0x533e60
push 2
call fcn.004b9ea0
add esp, 0x18
push dword [esp + 8]
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
int3
Function at 0x4b46a0
Capabilities:
Terminate process

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [ebx + 0x30]
push edi
mov dword [esi + 0x30], eax
mov dword [esi + 4], 0
mov edi, dword [ebx + 4]
mov ebp, dword [ebx]
lea eax, [edi + 1]
push eax
push esi
call fcn.004b5650
add esp, 8
test eax, eax
je 0x4b46f2
test edi, edi
je 0x4b46e4
mov eax, dword [esi + 4]
add eax, dword [esi]
push edi
push ebp
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
add dword [esi + 4], edi
mov ecx, dword [esi + 4]
mov eax, dword [esi]
mov byte [ecx + eax], 0
jmp 0x4b4701
push str.Out_of_memory
push 1
call fcn.004b3c50
add esp, 8
mov dword [esi + 0x10], 0
lea edi, [esi + 0xc]
mov eax, dword [ebx + 0xc]
mov ebp, dword [ebx + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 4]
inc eax
add eax, ebp
push eax
push edi
call fcn.004b5650
add esp, 8
test eax, eax
je 0x4b474f
test ebp, ebp
je 0x4b4741
mov eax, dword [edi + 4]
add eax, dword [edi]
push ebp
push dword [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
add dword [edi + 4], ebp
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov byte [ecx + eax], 0
jmp 0x4b475e
push str.Out_of_memory
push 1
call fcn.004b3c50
add esp, 8
mov dword [esi + 0x1c], 0
add esi, 0x18
mov edi, dword [ebx + 0x1c]
mov ebx, dword [ebx + 0x18]
mov eax, dword [esi + 4]
inc eax
add eax, edi
add eax, eax
push eax
push esi
call fcn.004b5650
add esp, 8
test eax, eax
je 0x4b47b2
test edi, edi
je 0x4b479f
mov ecx, dword [esi + 4]
lea eax, [edi + edi]
push eax
mov eax, dword [esi]
push ebx
lea eax, [eax + ecx*2]
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
add dword [esi + 4], edi
xor edx, edx
mov ecx, dword [esi + 4]
mov eax, dword [esi]
pop edi
pop esi
pop ebp
mov word [eax + ecx*2], dx
pop ebx
ret
pop edi
pop esi
pop ebp
pop ebx
mov dword [esp + 8], str.Out_of_memory
mov dword [esp + 4], 1
jmp fcn.004b3c50

Function at 0x4b5310
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov ebx, dword [eax]
push edi
mov edi, dword [eax + 4]
mov eax, dword [esi + 4]
inc eax
add eax, edi
push eax
push esi
call fcn.004b5650
add esp, 8
test eax, eax
je 0x4b5359
test edi, edi
je 0x4b5349
mov eax, dword [esi + 4]
add eax, dword [esi]
push edi
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
add dword [esi + 4], edi
mov ecx, dword [esi + 4]
mov eax, dword [esi]
pop edi
pop esi
pop ebx
mov byte [ecx + eax], 0
ret
pop edi
pop esi
pop ebx
mov dword [esp + 8], str.Out_of_memory
mov dword [esp + 4], 1
jmp fcn.004b3c50
Function at 0x4b9940
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov ebp, dword [esp + 0xc]
push esi
xor esi, esi
push edi
mov edi, dword [sym.imp.MSVCRT.dll__errno]
test eax, 0xffff7fff
jne 0x4b9a24
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4b99bd
call ebx
cmp eax, 3
jne 0x4b99a3
push ebp
call fcn.004b9c70
mov esi, eax
add esp, 4
test esi, esi
jne 0x4b9997
call edi
pop edi
pop esi
pop ebp
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4b99bd
call ebx
push eax
call fcn.004b9880
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x4b9a18
push 0
push 0x2000001
push 3
push 0
push 0
push 0
test esi, esi
je 0x4b99dd
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4b99e4
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
mov edi, eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
cmp edi, 0xffffffff
jne 0x4b9a07
call ebx
push eax
call fcn.004b9880
add esp, 4
or eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push 0
push edi
call dword [sym.imp.MSVCRT.dll__open_osfhandle]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
ret
test esi, esi
jne 0x4b9abb
mov eax, dword [esp + 0x18]
push dword [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.MSVCRT.dll__open]
mov esi, eax
add esp, 0xc
test esi, esi
jns 0x4b9b49
call edi
cmp dword [eax], 0xd
jne 0x4b9a91
test dword [esp + 0x18], 0x100
je 0x4b9a91
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4b9a6d
call ebx
push eax
call fcn.004b9880
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x4b9a81
call edi
pop edi
pop esi
pop ebp
mov dword [eax], 0x15
or eax, 0xffffffff
pop ebx
ret
call edi
pop edi
pop esi
pop ebp
mov dword [eax], 0xd
or eax, 0xffffffff
pop ebx
ret
call edi
cmp dword [eax], 2
jne 0x4b9b49
push ebp
call fcn.004b9c70
mov esi, eax
add esp, 4
test esi, esi
jne 0x4b9abb
call edi
pop edi
pop esi
pop ebp
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
ret
push dword [esp + 0x1c]
mov ebp, dword [esp + 0x1c]
push ebp
push esi
call dword [sym.imp.MSVCRT.dll__wopen]
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jns 0x4b9b36
call edi
cmp dword [eax], 0xd
jne 0x4b9b36
test ebp, 0x100
je 0x4b9b36
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4b9b0f
call ebx
push eax
call fcn.004b9880
add esp, 4
push esi
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x4b9b2e
call edi
push esi
mov dword [eax], 0x15
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret
call edi
mov dword [eax], 0xd
push esi
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
Function at 0x4b9b50
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x4b9b68
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
cmp dword [esp + 0xc], 0
jne 0x4b9b72
xor eax, eax
ret
push eax
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
add esp, 4
lea ecx, [esp + 4]
push 0
push ecx
push dword [esp + 0x14]
push dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4b9bda
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe8
jne 0x4b9bb3
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xb
or eax, 0xffffffff
ret
cmp eax, 0x6d
je 0x4b9b6f
cmp eax, 5
jne 0x4b9bcd
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.004b9880
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x4b9ea0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x4b9eb8
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push 0
lea ecx, [esp + 8]
push ecx
push dword [esp + 0x14]
push dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4b9f04
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4b9ef7
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.004b9880
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x4ba1f0
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea eax, [esp + 4]
push 0xf0000000
push 1
push 0
push 0
push eax
call esi
test eax, eax
jne 0x4ba22e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x4ba257
push 8
push 1
push 0
push 0
lea eax, [esp + 0x14]
push eax
call esi
test eax, eax
je 0x4ba257
push dword [esp + 0xc]
push dword [esp + 0x14]
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [esp + 8]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test esi, esi
je 0x4ba257
xor eax, eax
pop esi
pop ecx
ret
mov eax, 0xffffffe7
pop esi
pop ecx
ret
Function at 0x4e27f0
Capabilities:
Encode data using xor

Disassembly:
push edi
call fcn.004e2830
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0xc]
not eax
test edi, edi
je 0x4e2829
push esi
mov esi, dword [esp + 0xc]
lea esp, [esp]
movzx ecx, byte [esi]
lea esi, [esi + 1]
movzx edx, al
xor edx, ecx
shr eax, 8
xor eax, dword [edx*4 + 0x765f40]
dec edi
jne 0x4e2810
pop esi
not eax
pop edi
ret