joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c0f9
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.004098e0
mov eax, dword [0x4127d8]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x4130e0]
mov dword [ebp - 4], eax
jae 0x40c239
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x413100]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40c239
push 1
push esi
push ebx
call fcn.00408e18
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x40c243
push 2
push esi
push ebx
call fcn.00408e18
add esp, 0xc
cmp eax, 0xffffffff
je 0x40c243
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40c1e6
push 0x1000
lea eax, [ebp - 0x1008]
push esi
push eax
call fcn.00405f40
push 0x8000
push ebx
call fcn.0040cce4
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40c1a5
mov eax, edi
push eax
lea eax, [ebp - 0x1008]
push eax
push ebx
call fcn.00408312
add esp, 0xc
cmp eax, 0xffffffff
je 0x40c1c3
sub edi, eax
test edi, edi
jg 0x40c19a
jmp 0x40c1d9
cmp dword [0x412c64], 5
jne 0x40c1d6
mov dword [0x412c60], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040cce4
pop ecx
pop ecx
jmp 0x40c226
jge 0x40c226
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00408e18
push ebx
call fcn.0040a936
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x40c226
mov dword [0x412c60], 0xd
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x412c64], eax
push 0
push dword [ebp - 8]
push ebx
call fcn.00408e18
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40c246
mov dword [0x412c60], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.0040aa99
leave
ret
Function at 0x40c255
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x4130e0]
push edi
jae 0x40c41c
mov eax, esi
sar eax, 5
lea ebx, [eax*4 + 0x413100]
mov eax, dword [ebx]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40c41c
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov edi, dword [ebp + 0xc]
mov ecx, edi
je 0x40c2fb
test dl, 2
jne 0x40c2fb
test dl, 0x48
je 0x40c2c5
mov al, byte [eax + 5]
cmp al, 0xa
je 0x40c2c5
dec dword [ebp + 0x10]
mov byte [edi], al
mov eax, dword [ebx]
lea ecx, [edi + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [ebx]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x40c30e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40c2f6
mov dword [0x412c64], ecx
jmp 0x40c423
cmp eax, 0x6d
jne 0x40c302
xor eax, eax
jmp 0x40c430
push eax
call fcn.0040a749
pop ecx
jmp 0x40c42d
mov eax, dword [ebx]
mov edx, dword [ebp - 0x10]
add dword [ebp - 0xc], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x40c417
test edx, edx
je 0x40c331
cmp byte [edi], 0xa
jne 0x40c331
or al, 4
jmp 0x40c333
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40c411
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40c401
cmp al, 0xd
je 0x40c367
mov byte [edi], al
inc edi
inc dword [ebp - 8]
jmp 0x40c3f3
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40c381
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40c37c
add dword [ebp - 8], 2
jmp 0x40c3d5
mov dword [ebp - 8], eax
jmp 0x40c3ef
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x40c3a9
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x40c3ef
cmp dword [ebp - 0x10], 0
je 0x40c3ef
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x48
je 0x40c3ca
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40c3d5
mov byte [edi], 0xd
mov ecx, dword [ebx]
mov byte [ecx + esi + 5], al
jmp 0x40c3f2
cmp edi, dword [ebp + 0xc]
jne 0x40c3da
cmp byte [ebp - 1], 0xa
jne 0x40c3da
mov byte [edi], 0xa
jmp 0x40c3f2
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00408e18
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40c3f3
mov byte [edi], 0xd
inc edi
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40c34b
jmp 0x40c411
mov eax, dword [ebx]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x40c411
or al, 2
mov byte [esi], al
sub edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], edi
mov eax, dword [ebp - 0xc]
jmp 0x40c430
and dword [0x412c64], 0
mov dword [0x412c60], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c94f
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.004098e0
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x40c9e4
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x412c6c]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x40c9e4
cmp eax, 1
je 0x40c9fc
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
test eax, eax
je 0x40c9e4
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x40c9b9
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x40c9e0
xor eax, eax
inc eax
jmp 0x40ca18
cmp esi, ebx
jae 0x40c9e8
xor eax, eax
jmp 0x40ca18
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov eax, dword [0x412c6c]
jmp 0x40c9fe
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402c60
Capabilities:
Create thread

Disassembly:
sub esp, 0x2c
mov eax, dword [esp + 0x38]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 8], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
sub esp, 0x18
test eax, eax
mov edx, dword [esp + 0x30]
mov dword [edx], eax
je 0x402ca9
add esp, 0x2c
ret
mov dword [esp], str.CreateThread_failed
call fcn.00402a80
lea esi, [esi]
lea edi, [edi]
sub esp, 0x1c
mov eax, dword [esp + 0x20]
mov dword [esp + 4], 0xffffffff
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
add esp, 0x1c
ret

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

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp - 8]
sub esp, 0x74
mov dword [ebp - 0x44], 0x4f3670
mov dword [ebp - 0x40], 0x4f49fe
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x38], 0x404900
mov dword [ebp - 0x34], esp
mov dword [esp], eax
call fcn.00458010
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
jle 0x4048a0
mov edx, dword [ebp + 8]
lea ecx, [eax - 1]
mov edx, dword [edx]
cmp byte [edx + eax - 1], 0x2f
je 0x4048b0
lea eax, [ebp - 0x20]
mov dword [esp + 8], 0x5c
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [ebp - 0x58], 0xffffffff
call fcn.00403260
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [ebp - 0x58], 1
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x18]
setne byte [ebp - 0x60]
cmp eax, edx
je 0x404886
mov dword [esp], eax
call fcn.004f28f0
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call fcn.004580a0
movzx eax, byte [ebp - 0x60]
mov ebx, dword [ebp - 4]
leave
ret
mov byte [ebp - 0x60], 0
jmp 0x404886
cmp ecx, eax
lea ebx, [ebp - 0x18]
cmovbe eax, ecx
lea ecx, [ebp - 0x20]
add eax, edx
mov dword [ebp - 0x20], ebx
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x58], 0xffffffff
call fcn.00401570
lea eax, [ebp - 0x20]
sub esp, 8
mov dword [esp], eax
mov ecx, dword [ebp + 8]
call fcn.004dbae0
mov eax, dword [ebp - 0x20]
sub esp, 4
cmp eax, ebx
je 0x4048f6
mov dword [esp], eax
call fcn.004f28f0
mov eax, dword [ebp + 8]
mov edx, dword [eax]
jmp 0x404839
Function at 0x404930
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
lea eax, [ebp - 8]
mov dword [ebp - 0x44], 0x4f3670
mov dword [ebp - 0x40], 0x4f4a04
mov dword [ebp - 0x38], 0x4049bf
mov dword [ebp - 0x34], esp
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call fcn.00458010
mov dword [esp + 8], 0x5c
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x20]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [ebp - 0x58], 0xffffffff
call fcn.00403260
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [ebp - 0x58], 1
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
sub esp, 4
test eax, eax
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x18]
setne byte [ebp - 0x60]
cmp eax, edx
je 0x4049ae
mov dword [esp], eax
call fcn.004f28f0
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call fcn.004580a0
movzx eax, byte [ebp - 0x60]
leave
ret

Function at 0x4049f0
Capabilities:
Check if file exists

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.00403710
cmp ebx, 2
je 0x404aa0
cmp ebx, 3
je 0x404ac0
cmp ebx, 5
je 0x404ae0
cmp ebx, 0x20
je 0x404b00
cmp ebx, 0xa1
je 0x404b20
cmp ebx, 0x7b
je 0x404b40
cmp ebx, 0x40
je 0x404a80
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.:_Windows_error__d_n
add eax, 0x40
mov dword [esp], eax
call fcn.00462d60
add esp, 0x18
pop ebx
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.:_network_name_no_longer_available_n
add eax, 0x40
mov dword [esp], eax
call fcn.00462d60
add esp, 0x18
pop ebx
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.:_file_not_found_n
add eax, 0x40
mov dword [esp], eax
call fcn.00462d60
jmp 0x404a7a
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.:_path_not_found_n
add eax, 0x40
mov dword [esp], eax
call fcn.00462d60
jmp 0x404a7a
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.:_access_denied_n
add eax, 0x40
mov dword [esp], eax
call fcn.00462d60
jmp 0x404a7a
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.:_sharing_violation_n
add eax, 0x40
mov dword [esp], eax
call fcn.00462d60
jmp 0x404a7a
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.:_bad_pathname_n
add eax, 0x40
mov dword [esp], eax
call fcn.00462d60
jmp 0x404a7a
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.:_invalid_name_n
add eax, 0x40
mov dword [esp], eax
call fcn.00462d60
jmp 0x404a7a
Function at 0x404fd0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xa4
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x54], 0x4f3670
mov dword [ebp - 0x50], 0x4f4a18
mov dword [ebp - 0x48], 0x4051bd
mov dword [ebp - 0x44], esp
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x74], edx
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x80], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x7c], edx
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x6c]
mov dword [esp], eax
call fcn.00458010
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov ebx, dword [eax]
test ecx, ecx
je 0x4050ce
mov dword [ebp - 0x70], 0
mov eax, dword [ebp - 0x70]
jmp 0x40504f
cmp al, 0x5c
je 0x405059
add dword [ebp - 0x70], 1
mov eax, dword [ebp - 0x70]
cmp eax, ecx
jae 0x4050ce
lea edx, [ebx + eax]
movzx eax, byte [edx]
cmp al, 0x2f
jne 0x405040
mov byte [edx], 0
mov dword [esp + 8], 0x5c
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], eax
lea eax, [ebp - 0x20]
mov dword [esp], eax
mov dword [ebp - 0x68], 0xffffffff
call fcn.00403260
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [ebp - 0x68], 1
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x18]
sub esp, 8
cmp eax, edx
je 0x4050af
mov dword [esp], eax
call fcn.004f28f0
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 0x70]
add dword [ebp - 0x70], 1
mov eax, dword [eax]
mov byte [eax + ebx], 0x2f
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov ebx, dword [eax]
mov eax, dword [ebp - 0x70]
cmp eax, ecx
jb 0x40504f
lea eax, [ebp - 0x30]
add ecx, ebx
mov dword [ebp - 0x38], eax
mov dword [esp + 4], ecx
lea ecx, [ebp - 0x38]
mov dword [esp], ebx
mov dword [ebp - 0x68], 0xffffffff
call fcn.00401570
lea ecx, [ebp - 0x38]
sub esp, 8
mov dword [esp], 0x4f906e
mov dword [ebp - 0x68], 2
call fcn.00473d20
sub esp, 4
test eax, eax
je 0x4051b5
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
cmp byte [eax + ecx - 1], 0x2f
lea edx, [ecx - 1]
je 0x40516f
mov dword [esp + 0x14], 0xffffffff
movq xmm0, qword [ebp - 0x80]
movq qword [esp + 0xc], xmm0
movq xmm1, qword [ebp - 0x78]
movq qword [esp + 4], xmm1
mov dword [esp], eax
mov dword [ebp - 0x68], 2
call fcn.00404b60
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x30]
cmp eax, ecx
je 0x40515f
mov dword [esp], eax
call fcn.004f28f0
lea eax, [ebp - 0x6c]
mov dword [esp], eax
call fcn.004580a0
mov ebx, dword [ebp - 4]
leave
ret
cmp edx, ecx
lea ebx, [ebp - 0x18]
cmova edx, ecx
lea ecx, [ebp - 0x20]
add edx, eax
mov dword [ebp - 0x20], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [ebp - 0x68], 2
call fcn.00401570
lea eax, [ebp - 0x20]
sub esp, 8
lea ecx, [ebp - 0x38]
mov dword [esp], eax
call fcn.004dbae0
mov eax, dword [ebp - 0x20]
sub esp, 4
cmp eax, ebx
je 0x4051b5
mov dword [esp], eax
call fcn.004f28f0
mov eax, dword [ebp - 0x38]
jmp 0x405120
Function at 0x425d70
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov eax, dword [ebx]
test eax, eax
je 0x425df0
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub esp, 0xc
mov dword [ebx], 0
mov dword [edi], 0
test esi, esi
jle 0x425de0
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x3000
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
sub esp, 0x10
test eax, eax
mov dword [ebx], eax
je 0x425e00
mov dword [edi], esi
add esp, 0x10
pop ebx
pop esi
pop edi
ret
mov eax, dword [edi]
test eax, eax
jne 0x425da4
jmp 0x425db0
mov dword [edi], 0
mov dword [esp + 0x20], 0x4facf6
add esp, 0x10
pop ebx
pop esi
pop edi
jmp fcn.00402a80

Function at 0x425e20
Capabilities:
Hash data using sha1

Disassembly:
push edi
lea edi, [ecx + 0x20]
lea eax, [ecx + 0x1c]
mov dword [ecx], 0
mov dword [ecx + 4], 0
and edi, 0xfffffffc
mov dword [ecx + 8], 0x67452301
mov dword [ecx + 0xc], 0xefcdab89
sub eax, edi
mov dword [ecx + 0x10], 0x98badcfe
mov dword [ecx + 0x14], 0x10325476
mov dword [ecx + 0x18], 0xc3d2e1f0
mov dword [ecx + 0x1c], 0
mov dword [ecx + 0x58], 0
lea ecx, [eax + 0x40]
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
pop edi
ret
Function at 0x427670
Capabilities:
Hash data using sha256

Disassembly:
push edi
lea edi, [ecx + 0x2c]
lea eax, [ecx + 0x28]
mov dword [ecx + 4], 0
mov dword [ecx], 0
and edi, 0xfffffffc
mov dword [ecx + 8], 0x6a09e667
mov dword [ecx + 0xc], 0xbb67ae85
sub eax, edi
mov dword [ecx + 0x10], 0x3c6ef372
mov dword [ecx + 0x14], 0xa54ff53a
mov dword [ecx + 0x18], 0x510e527f
mov dword [ecx + 0x1c], 0x9b05688c
mov dword [ecx + 0x20], 0x1f83d9ab
mov dword [ecx + 0x24], 0x5be0cd19
mov dword [ecx + 0x28], 0
mov dword [ecx + 0x64], 0
lea ecx, [eax + 0x40]
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
pop edi
ret
Function at 0x42ce50
Capabilities:
Generate random numbers via winapi

Disassembly:
push esi
push ebx
sub esp, 0x34
lea eax, [esp + 0x2c]
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x10], 0xf0000000
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
sub esp, 0x14
test eax, eax
jne 0x42cee0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], 0x4facaa
add eax, 0x40
mov dword [esp], eax
call fcn.0041f320
mov dword [esp], 0x4fae05
call fcn.00402a80
test esi, esi
jle 0x42cece
movzx eax, byte [ebx]
cmp al, 0x7a
je 0x42ced4
cmp al, 0x37
je 0x42ced4
add esp, 0x34
pop ebx
pop esi
ret
add eax, 0xffffff80
mov byte [ebx], al
add esp, 0x34
pop ebx
pop esi
ret
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
sub esp, 0xc
test eax, eax
je 0x42ce91
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
sub esp, 8
jmp 0x42cebf

Function at 0x430a10
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push esi
push ebx
mov ebx, ecx
sub esp, 0x14
mov esi, dword [ebx + 8]
mov ecx, dword [ecx + 4]
mov eax, esi
sub eax, ecx
mul dword [esp + 0x24]
shrd eax, edx, 0x10
mov edx, dword [esp + 0x20]
add eax, ecx
test edx, edx
je 0x430a80
mov dword [ebx + 8], eax
xor ecx, eax
cmp ecx, 0xffffff
ja 0x430a78
mov ecx, dword [ebx]
shr eax, 0x18
mov edx, dword [ecx]
mov dword [esp], eax
mov eax, dword [edx]
call eax
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
xor edx, edx
sub esp, 4
shl eax, 8
shl ecx, 8
or al, 0xff
test ecx, ecx
sete dl
mov dword [ebx + 8], eax
add edx, ecx
mov dword [ebx + 4], edx
xor edx, eax
cmp edx, 0xffffff
jbe 0x430a40
add esp, 0x14
pop ebx
pop esi
ret 8
lea ecx, [eax + 1]
mov eax, esi
mov dword [ebx + 4], ecx
jmp 0x430a36
Function at 0x456700
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp fcn.00456760

Function at 0x456760
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x50c4c0]
test esi, esi
jle 0x45684d
mov edi, dword [0x50c4c4]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x456794
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x456846
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x456780
mov dword [esp], eax
mov esi, eax
call fcn.004570b0
test eax, eax
mov edi, eax
je 0x45688a
mov esi, dword [0x50c4c4]
lea ebx, [ebx + ebx*2]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call fcn.004571c0
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x50c4c4]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x45686a
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x45683f
sub eax, 0x40
and eax, 0xffffffbf
je 0x45683f
mov eax, dword [esp + 0x20]
add ebx, dword [0x50c4c4]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x456854
add dword [0x50c4c0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor ebx, ebx
jmp 0x45679e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00456700
mov eax, dword [0x50c4c4]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00456700
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00456700
lea esi, [esi]
Function at 0x456d20
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x50c4d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x50c4d0]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x456d75
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x456d6e
test esi, esi
je 0x456d6e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x456d50
mov dword [esp], 0x50c4d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4579a0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov eax, ebx
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x4579e0
Capabilities:
Set thread local storage value

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je 0x457a05
xor eax, eax
add esp, 0x1c
ret
add esp, 0x1c
jmp dword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x457d70
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0x1c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x457da4
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [0x50c4f4], eax
call fcn.00462b30
test eax, eax
sete al
movzx eax, al
mov dword [0x4f787c], eax
add esp, 0x1c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x457d93