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

Disassembly:
push edi
push dword [0x5aa88c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x47c891
push esi
push dword [0x5aa888]
push 8
push dword [0x5a8518]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x5aa88c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x5aa884]
jmp 0x47c881
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x47c87f
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x47c86f
push edi
push 0x47c7ce
call fcn.0054c575
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

Function at 0x47c89b
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 0x47c8b1
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x5aa888]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x47c8e8
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
push 8
push dword [0x5a8518]
mov dword [0x5aa88c], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x5aa88c]
call ebx
mov eax, dword [0x5aa888]
mov edi, eax
add eax, esi
push eax
push dword [0x5aa88c]
mov dword [0x5aa888], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x5a8518]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x5aa88c]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x47c928
test ebx, ebx
je 0x47c949
push 0x14
push 0x5aa884
call fcn.0047d1d9
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x47c949
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 0x47d350
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x5a3de8]
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 0x47d380
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x5a3de8]
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 0x47d3c6
mov ecx, dword [ebp - 4]
add ecx, 0xa
push ecx
push 0
mov edx, dword [0x5ab3ac]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x47d3e7
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 [0x5ab3ac]
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.0047dd00
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8

Function at 0x47d4e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x5a3de8]
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 0x47d5d0
Capabilities:
Get thread local storage value

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

Function at 0x47d700
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x5a3de8]
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 0x47d730
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x5a3de8]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x47d754
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 0x47d7a4
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 [0x5ab3ac]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
jmp 0x47d7ec
mov edx, dword [ebp - 4]
cmp dword [edx + 4], 0x100000
jle 0x47d7ec
cmp dword [ebp - 8], 0x100000
jge 0x47d7c0
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 [0x5ab3ac]
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 0x47d810
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x5a3de8]
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 0x47dc30
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x5a3de8]
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 0x47dc6e
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 0x47dc6e
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub ecx, dword [eax]
add ecx, 1
mov eax, ecx
jmp 0x47dc70
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x47e0b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x5a3de8]
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 0x47e0f0
Capabilities:
Query environment variable

Disassembly:
push str.EXPAT_ENTROPY_DEBUG
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x47e154
mov ecx, 0x563920
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x47e127
test dl, dl
je 0x47e123
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x47e127
add eax, 2
add ecx, 2
test dl, dl
jne 0x47e107
xor eax, eax
jmp 0x47e12c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x47e154
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 0x4824c0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
sub esp, 0xc
push esi
xor esi, esi
jmp 0x4824d0
push 4
lea eax, [esp + 8]
mov dword [esp + 8], 0
push eax
call sub.ADVAPI32.DLL_SystemFunction036
test al, al
je 0x482521
mov edx, dword [esp + 4]
xor ecx, ecx
mov edi, edi
cmp esi, 4
jae 0x48250b
mov eax, edx
shr eax, cl
add ecx, 8
mov byte [esp + esi + 8], al
inc esi
cmp ecx, 0x20
jb 0x4824f0
cmp esi, 4
jb 0x4824d0
push dword [esp + 8]
push str.rand_s
call fcn.0047e0f0
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.0047e0f0
add esp, 8
pop esi
add esp, 0xc
ret

Function at 0x485e90
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
cmp dword [esp + 0x10], 0
jle 0x485f92
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
mov ecx, dword [eax]
mov edx, dword [eax + 4]
push edi
jmp 0x485eb0
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 0x485eb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x49d350
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 0x49d360
mov esi, eax
test esi, esi
je 0x49d3f2
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.00499dc0
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.00499dc0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [edi + 8], eax
dec esi
jne 0x49d380
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 0x49d400
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 0x49d485
push ebx
mov ebx, dword [esp + 0x14]
jmp 0x49d430
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.00499dc0
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.00499dc0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [esi + 8], eax
dec edi
jne 0x49d430
pop ebx
pop edi
xor eax, eax
pop esi
ret

Function at 0x49fcb0
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 0x49fcbf
mov edi, eax
test edi, edi
je 0x49fd3d
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.00499dc0
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.00499dc0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [esi + 8], eax
dec edi
jne 0x49fcd4
pop esi
pop ebp
pop ebx
pop edi
ret
Function at 0x49fd60
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
sub esp, 0x10
cmp dword [esp + 0x24], 0xc
jae 0x49fd78
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 0x49fdf5
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.00499dc0
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.00499dc0
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [esi + 8], eax
dec edi
jne 0x49fda0
pop ebx
push 0xc
lea eax, [esp + 0x10]
push eax
push 0xc
push dword [esp + 0x34]
push esi
call fcn.0049fcb0
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 0x4a5840
Capabilities:
Terminate process

Disassembly:
mov edx, dword [str.Fatal_Internal_Error_in_libarchive:]
mov ecx, edx
push esi
lea esi, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a5850
sub ecx, esi
push ecx
push edx
push 2
call fcn.004ab510
mov edx, dword [esp + 0x18]
add esp, 0xc
mov ecx, edx
lea esi, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a5870
sub ecx, esi
push ecx
push edx
push 2
call fcn.004ab510
push 1
push 0x56a990
push 2
call fcn.004ab510
add esp, 0x18
push dword [esp + 8]
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
int3

Function at 0x4a5ec0
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 eax, dword [ebx]
mov dword [esp + 0x18], eax
lea eax, [edi + 1]
push eax
push esi
call fcn.004a6e00
mov ebp, dword [sym.imp.MSVCRT.dll_memmove]
add esp, 8
test eax, eax
je 0x4a5f17
mov eax, dword [esi + 4]
add eax, dword [esi]
push edi
push dword [esp + 0x1c]
push eax
call ebp
mov eax, dword [esi]
add esp, 0xc
add dword [esi + 4], edi
mov ecx, dword [esi + 4]
mov byte [ecx + eax], 0
jmp 0x4a5f26
push str.Out_of_memory
push 1
call fcn.004a5840
add esp, 8
mov dword [esi + 0x10], 0
lea edi, [esi + 0xc]
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 4]
inc eax
mov dword [esp + 0x18], ecx
add eax, ecx
push eax
push edi
call fcn.004a6e00
add esp, 8
test eax, eax
je 0x4a5f77
push dword [esp + 0x18]
mov eax, dword [edi]
push dword [esp + 0x18]
add eax, dword [edi + 4]
push eax
call ebp
mov eax, dword [esp + 0x24]
add esp, 0xc
add dword [edi + 4], eax
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov byte [ecx + eax], 0
jmp 0x4a5f86
push str.Out_of_memory
push 1
call fcn.004a5840
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.004a6e00
add esp, 8
test eax, eax
je 0x4a5fd2
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 ebp
add dword [esi + 4], edi
add esp, 0xc
mov ecx, dword [esi + 4]
xor edx, edx
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.004a5840
Function at 0x4aafb0
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 0x4ab094
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4ab02d
call ebx
cmp eax, 3
jne 0x4ab013
push ebp
call fcn.004ab2e0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4ab007
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 0x4ab02d
call ebx
push eax
call fcn.004aaee0
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 0x4ab088
push 0
push 0x2000001
push 3
push 0
push 0
push 0
test esi, esi
je 0x4ab04d
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4ab054
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 0x4ab077
call ebx
push eax
call fcn.004aaee0
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 0x4ab12b
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 0x4ab1b9
call edi
cmp dword [eax], 0xd
jne 0x4ab101
test dword [esp + 0x18], 0x100
je 0x4ab101
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4ab0dd
call ebx
push eax
call fcn.004aaee0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x4ab0f1
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 0x4ab1b9
push ebp
call fcn.004ab2e0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4ab12b
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 0x4ab1a6
call edi
cmp dword [eax], 0xd
jne 0x4ab1a6
test ebp, 0x100
je 0x4ab1a6
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4ab17f
call ebx
push eax
call fcn.004aaee0
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 0x4ab19e
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 0x4ab1c0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x4ab1d8
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
cmp dword [esp + 0xc], 0
jne 0x4ab1e2
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 0x4ab24a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe8
jne 0x4ab223
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xb
or eax, 0xffffffff
ret
cmp eax, 0x6d
je 0x4ab1df
cmp eax, 5
jne 0x4ab23d
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.004aaee0
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x4ab510
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x4ab528
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 0x4ab574
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4ab567
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.004aaee0
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x4ab860
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 0x4ab89e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x4ab8c7
push 8
push 1
push 0
push 0
lea eax, [esp + 0x14]
push eax
call esi
test eax, eax
je 0x4ab8c7
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 0x4ab8c7
xor eax, eax
pop esi
pop ecx
ret
mov eax, 0xffffffe7
pop esi
pop ecx
ret

Function at 0x4d4790
Capabilities:
Query environment variable

Disassembly:
push edi
push str.OPJ_NUM_THREADS
call sub.MSVCRT.dll_getenv
mov edi, eax
add esp, 4
test edi, edi
je 0x4d4810
call fcn.004e40b0
test eax, eax
je 0x4d4810
push esi
call fcn.004e40a0
mov esi, eax
mov ecx, str.ALL_CPUS
mov edx, edi
push ebx
lea ecx, [ecx]
mov bl, byte [edx]
cmp bl, byte [ecx]
jne 0x4d47e0
test bl, bl
je 0x4d47dc
mov al, byte [edx + 1]
cmp al, byte [ecx + 1]
jne 0x4d47e0
add edx, 2
add ecx, 2
test al, al
jne 0x4d47c0
xor eax, eax
jmp 0x4d47e5
sbb eax, eax
or eax, 1
pop ebx
test eax, eax
je 0x4d480b
test esi, esi
jne 0x4d47f3
mov esi, 0x20
push edi
call sub.MSVCRT.dll_atoi
add esp, 4
test eax, eax
jns 0x4d4805
xor eax, eax
pop esi
pop edi
ret
add esi, esi
cmp eax, esi
jle 0x4d4802
mov eax, esi
pop esi
pop edi
ret
xor eax, eax
pop edi
ret