joyce8/EMBER2024-capa huggingface dataset:
Function at 0x434c60
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
xor ecx, ecx
push ebx
mov ebx, dword [esp + 0x14]
push edi
lea edi, [ebx + 0x94]
mov al, byte [edi + ecx]
cmp al, 0x20
je 0x434c82
test al, al
je 0x434c82
sub al, 0x30
cmp al, 7
ja 0x434ca6
inc ecx
cmp ecx, 8
jb 0x434c71
mov dl, byte [edi]
push esi
test dl, dl
jns 0x434d20
test dl, 0x40
je 0x434cae
or bl, 0xff
or dl, 0x80
or esi, 0xffffffff
or ecx, 0xffffffff
jmp 0x434cb7
pop edi
xor eax, eax
pop ebx
add esp, 8
ret
xor bl, bl
and dl, 0x7f
xor esi, esi
xor ecx, ecx
mov al, bl
xor al, dl
jns 0x434ce4
test bl, bl
je 0x434cd2
mov ebx, dword [esp + 0x1c]
mov ecx, 0x80000000
xor esi, esi
mov dword [esp + 0x10], ecx
jmp 0x434d33
mov ebx, dword [esp + 0x1c]
mov ecx, 0x7fffffff
or esi, 0xffffffff
mov dword [esp + 0x10], ecx
jmp 0x434d33
mov ebx, 7
lea esp, [esp]
shld ecx, esi, 8
movzx eax, dl
lea edi, [edi + 1]
cdq
shl esi, 8
or ecx, edx
mov dl, byte [edi]
or esi, eax
dec ebx
jne 0x434cf0
mov ebx, dword [esp + 0x1c]
shld ecx, esi, 8
movzx eax, dl
shl esi, 8
cdq
or esi, eax
or ecx, edx
mov dword [esp + 0x10], ecx
jmp 0x434d33
push 8
push 8
push edi
call fcn.00437be0
add esp, 0xc
mov dword [esp + 0x10], edx
mov esi, eax
xor edx, edx
xor ecx, ecx
xor edi, edi
lea esp, [esp]
movzx eax, byte [ebx + ecx]
add edx, eax
movzx eax, byte [ebx + ecx + 1]
add ecx, 2
add edi, eax
cmp ecx, 0x94
jb 0x434d40
push ebp
mov ebp, 0x9c
add edx, edi
cmp ecx, ebp
jae 0x434d6f
mov eax, ebp
sub eax, ecx
add ecx, eax
shl eax, 5
add edx, eax
xor edi, edi
xor ebx, ebx
cmp ecx, 0x200
jae 0x434dc4
mov eax, 0x200
sub eax, ecx
cmp eax, 2
jb 0x434dad
mov ebp, dword [esp + 0x20]
jmp 0x434d90
movzx eax, byte [ecx + ebp]
add edi, eax
movzx eax, byte [ecx + ebp + 1]
add ecx, 2
add ebx, eax
cmp ecx, 0x1ff
jb 0x434d90
mov ebp, 0x9c
cmp ecx, 0x200
jae 0x434dbf
mov eax, dword [esp + 0x20]
movzx eax, byte [ecx + eax]
add edx, eax
lea eax, [ebx + edi]
add edx, eax
cmp esi, edx
jne 0x434dd5
pop ebp
pop esi
pop edi
mov eax, 1
pop ebx
add esp, 8
ret
mov ebx, dword [esp + 0x20]
xor edx, edx
xor eax, eax
xor edi, edi
nop
movsx ecx, byte [ebx + eax]
add edx, ecx
movsx ecx, byte [ebx + eax + 1]
add eax, 2
add edi, ecx
cmp eax, 0x94
jb 0x434de0
add edx, edi
cmp eax, 0x9c
jae 0x434e09
sub ebp, eax
add eax, ebp
shl ebp, 5
add edx, ebp
xor edi, edi
xor ebx, ebx
cmp eax, 0x200
jae 0x434e4d
mov ebp, dword [esp + 0x20]
mov ecx, 0x200
sub ecx, eax
cmp ecx, 2
jb 0x434e3b
movsx ecx, byte [eax + ebp]
add edi, ecx
movsx ecx, byte [eax + ebp + 1]
add eax, 2
add ebx, ecx
cmp eax, 0x1ff
jb 0x434e24
cmp eax, 0x200
jae 0x434e48
movsx eax, byte [eax + ebp]
add edx, eax
lea eax, [ebx + edi]
add edx, eax
pop ebp
xor eax, eax
cmp esi, edx
pop esi
pop edi
sete al
pop ebx
add esp, 8
ret
Function at 0x440c50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x18
cmp eax, 5
jae 0x440c62
xor eax, eax
add esp, 0x18
ret
mov ecx, dword [esp + 0x1c]
push ebx
mov ebx, dword [esp + 0x24]
push ebp
mov edx, dword [ecx + 0x4d00]
lea ebp, [eax - 4]
push esi
mov esi, dword [ecx + 0x4d04]
mov ecx, dword [ecx + 0x4d08]
push edi
xor edi, edi
mov dword [esp + 0x34], ecx
add ebp, ebx
mov dword [esp + 0x20], ebp
nop
lea eax, [edi + ebx]
mov dword [esp + 0x10], eax
cmp eax, ebp
jae 0x440cb3
jmp 0x440ca0
mov cl, byte [eax]
and cl, 0xfe
cmp cl, 0xe8
je 0x440caf
inc eax
cmp eax, ebp
jb 0x440ca0
mov dword [esp + 0x10], eax
mov edi, eax
sub edi, ebx
cmp eax, ebp
jae 0x440dd4
mov ecx, edi
sub ecx, edx
cmp ecx, 3
jbe 0x440ceb
xor esi, esi
mov dword [esp + 0x14], esi
mov cl, byte [eax + 4]
mov edx, edi
mov dword [esp + 0x24], edx
test cl, cl
je 0x440d27
cmp cl, 0xff
je 0x440d27
and esi, 3
add esi, esi
or esi, 1
inc edi
jmp 0x440c90
dec ecx
shl esi, cl
and esi, 7
mov dword [esp + 0x14], esi
je 0x440cce
movzx ecx, byte [esi + 0x4a53b8]
mov edx, eax
sub edx, ecx
cmp byte [esi + 0x4a53b0], 0
mov cl, byte [edx + 4]
je 0x440d17
test cl, cl
je 0x440d17
cmp cl, 0xff
jne 0x440cce
and esi, 3
mov edx, edi
add esi, esi
or esi, 1
inc edi
jmp 0x440c90
movzx ebx, cl
movzx ecx, byte [eax + 3]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [eax + 2]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [eax + 1]
shl ebx, 8
or ebx, ecx
sub ebx, dword [esp + 0x34]
sub ebx, edi
test esi, esi
je 0x440da6
movzx ecx, byte [esi + 0x4a53b8]
mov edx, 0x18
mov esi, dword [esp + 0x34]
shl ecx, 3
sub edx, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov ebp, ecx
mov eax, edx
mov edx, ebx
mov ecx, eax
shr edx, cl
test dl, dl
je 0x440d7f
cmp dl, 0xff
jne 0x440d96
mov ecx, 0x20
mov edx, 1
sub ecx, ebp
shl edx, cl
dec edx
xor ebx, edx
sub ebx, esi
sub ebx, edi
jmp 0x440d70
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov ecx, ebx
mov byte [eax + 1], bl
shr ecx, 0x18
and cl, 1
dec cl
not cl
mov byte [eax + 4], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [eax + 3], cl
mov ecx, ebx
mov ebx, dword [esp + 0x30]
shr ecx, 8
add edi, 5
mov byte [eax + 2], cl
jmp 0x440c90
mov eax, dword [esp + 0x2c]
add dword [eax + 0x4d08], edi
mov dword [eax + 0x4d04], esi
mov dword [eax + 0x4d00], edx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret

Function at 0x445920
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 0x445930
sub ecx, esi
push ecx
push edx
push 2
call fcn.0044bbb0
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 0x445950
sub ecx, esi
push ecx
push edx
push 2
call fcn.0044bbb0
push 1
push 0x4a6280
push 2
call fcn.0044bbb0
add esp, 0x18
push dword [esp + 8]
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
int3
Function at 0x4464f0
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.00447480
mov ebp, dword [sym.imp.MSVCRT.dll_memmove]
add esp, 8
test eax, eax
je 0x446547
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 0x446556
push str.Out_of_memory
push 1
call fcn.00445920
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.00447480
add esp, 8
test eax, eax
je 0x4465a7
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 0x4465b6
push str.Out_of_memory
push 1
call fcn.00445920
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.00447480
add esp, 8
test eax, eax
je 0x446602
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.00445920
Function at 0x44b650
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 0x44b734
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x44b6cd
call ebx
cmp eax, 3
jne 0x44b6b3
push ebp
call fcn.0044b980
mov esi, eax
add esp, 4
test esi, esi
jne 0x44b6a7
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 0x44b6cd
call ebx
push eax
call fcn.0044b580
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 0x44b728
push 0
push 0x2000001
push 3
push 0
push 0
push 0
test esi, esi
je 0x44b6ed
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x44b6f4
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 0x44b717
call ebx
push eax
call fcn.0044b580
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 0x44b7cb
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 0x44b859
call edi
cmp dword [eax], 0xd
jne 0x44b7a1
test dword [esp + 0x18], 0x100
je 0x44b7a1
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x44b77d
call ebx
push eax
call fcn.0044b580
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x44b791
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 0x44b859
push ebp
call fcn.0044b980
mov esi, eax
add esp, 4
test esi, esi
jne 0x44b7cb
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 0x44b846
call edi
cmp dword [eax], 0xd
jne 0x44b846
test ebp, 0x100
je 0x44b846
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x44b81f
call ebx
push eax
call fcn.0044b580
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 0x44b83e
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 0x44b860
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x44b878
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
cmp dword [esp + 0xc], 0
jne 0x44b882
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 0x44b8ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe8
jne 0x44b8c3
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xb
or eax, 0xffffffff
ret
cmp eax, 0x6d
je 0x44b87f
cmp eax, 5
jne 0x44b8dd
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.0044b580
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x44bbb0
Capabilities:
Write file on windows

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

Function at 0x45bbd0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [eax + 0x38]
mov bl, byte [eax + 0x34]
test esi, esi
jle 0x45bc0b
mov edx, dword [eax + 0x260]
push edi
movzx edi, bl
lea ebx, [ebx]
mov ecx, edx
shl edx, 8
shr ecx, 0x18
xor ecx, edi
xor edx, dword [ecx*4 + 0x4c2028]
mov dword [eax + 0x260], edx
dec esi
jne 0x45bbf0
pop edi
mov ecx, dword [eax + 0x34]
mov byte [eax + ecx + 0x58], 1
mov edx, dword [eax + 0x38]
mov ecx, edx
dec ecx
je 0x45bc92
dec ecx
je 0x45bc77
dec ecx
je 0x45bc6b
mov byte [edx + eax + 0x54], 1
mov edx, dword [eax + 0x44]
mov ecx, dword [eax + 0x24]
mov byte [edx + ecx], bl
inc dword [eax + 0x44]
mov edx, dword [eax + 0x44]
mov ecx, dword [eax + 0x24]
mov byte [edx + ecx], bl
inc dword [eax + 0x44]
mov edx, dword [eax + 0x44]
mov ecx, dword [eax + 0x24]
mov byte [edx + ecx], bl
inc dword [eax + 0x44]
mov edx, dword [eax + 0x44]
mov ecx, dword [eax + 0x24]
mov byte [edx + ecx], bl
inc dword [eax + 0x44]
mov esi, dword [eax + 0x44]
mov dl, byte [eax + 0x38]
mov ecx, dword [eax + 0x24]
sub dl, 4
mov byte [esi + ecx], dl
inc dword [eax + 0x44]
pop esi
pop ebx
ret
mov edx, dword [eax + 0x44]
mov ecx, dword [eax + 0x24]
mov byte [edx + ecx], bl
inc dword [eax + 0x44]
mov edx, dword [eax + 0x44]
mov ecx, dword [eax + 0x24]
pop esi
mov byte [edx + ecx], bl
inc dword [eax + 0x44]
mov edx, dword [eax + 0x44]
mov ecx, dword [eax + 0x24]
mov byte [edx + ecx], bl
inc dword [eax + 0x44]
pop ebx
ret
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x24]
pop esi
mov byte [edx + ecx], bl
inc dword [eax + 0x44]
pop ebx
ret
Function at 0x478b20
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x14], 0xca
jne 0x478b4f
push esi
call fcn.00478d00
add esp, 4
cmp byte [esi + 0x40], 0
je 0x478b48
mov dword [esi + 0x14], 0xcf
mov al, 1
pop esi
ret
mov dword [esi + 0x14], 0xcb
mov eax, dword [esi + 0x14]
push edi
cmp eax, 0xcb
jne 0x478bd2
mov eax, dword [esi + 0x1a8]
cmp byte [eax + 0x10], 0
je 0x478bbd
mov eax, dword [esi + 8]
test eax, eax
je 0x478b75
mov eax, dword [eax]
push esi
call eax
add esp, 4
mov eax, dword [esi + 0x1a8]
push esi
mov eax, dword [eax]
call eax
add esp, 4
test eax, eax
je 0x478bb8
cmp eax, 2
je 0x478bbd
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x478b66
cmp eax, 3
je 0x478b9d
cmp eax, 1
jne 0x478b66
inc dword [ecx + 4]
mov edx, dword [esi + 8]
mov edi, dword [edx + 8]
cmp dword [ecx + 4], edi
jl 0x478b66
mov eax, dword [esi + 0x128]
add eax, edi
mov dword [edx + 8], eax
jmp 0x478b66
pop edi
xor al, al
pop esi
ret
mov eax, dword [esi + 0x7c]
push esi
mov dword [esi + 0x84], eax
call fcn.00478c00
add esp, 4
pop edi
pop esi
ret
cmp eax, 0xcc
je 0x478bf4
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x15
mov ecx, dword [esi]
mov eax, dword [esi + 0x14]
mov dword [ecx + 0x18], eax
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
push esi
call fcn.00478c00
add esp, 4
pop edi
pop esi
ret

Function at 0x478c00
Capabilities:
Check for software breakpoints

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0xcc
je 0x478c2c
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax]
call eax
add esp, 4
mov dword [esi + 0x78], 0
mov dword [esi + 0x14], 0xcc
mov eax, dword [esi + 0x198]
cmp byte [eax + 8], 0
je 0x478cb2
lea ebx, [esi + 0x78]
jmp 0x478c40
mov eax, dword [ebx]
cmp eax, dword [esi + 0x60]
jae 0x478c86
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x478c65
mov dword [ecx + 4], eax
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0x60]
push esi
mov dword [ecx + 8], eax
mov eax, dword [esi + 8]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [esi + 0x19c]
mov edi, dword [ebx]
push 0
push ebx
mov eax, dword [eax + 4]
push 0
push esi
call eax
mov eax, dword [ebx]
add esp, 0x10
cmp eax, edi
je 0x478cc8
cmp eax, dword [esi + 0x60]
jb 0x478c47
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax + 4]
call eax
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax]
call eax
mov dword [ebx], 0
add esp, 8
mov eax, dword [esi + 0x198]
cmp byte [eax + 8], 0
jne 0x478c40
xor eax, eax
cmp byte [esi + 0x41], al
pop edi
setne al
add eax, 0xcd
mov dword [esi + 0x14], eax
mov al, 1
pop esi
pop ebx
ret
pop edi
pop esi
xor al, al
pop ebx
ret
Function at 0x479e40
Capabilities:
Query environment variable

Disassembly:
push ecx
push esi
push edi
mov edi, dword [esp + 0x10]
push edi
mov dword [edi + 4], 0
call fcn.00486060
push 0x54
push edi
mov dword [esp + 0x14], eax
call fcn.00486030
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x479e87
push edi
call fcn.00486070
mov ecx, dword [edi]
push edi
mov dword [ecx + 0x14], 0x38
mov ecx, dword [edi]
mov dword [ecx + 0x18], esi
mov eax, dword [edi]
mov eax, dword [eax]
call eax
add esp, 8
mov dword [esi], fcn.00479ad0
mov dword [esi + 4], fcn.00479960
mov dword [esi + 8], fcn.00479a30
mov dword [esi + 0xc], fcn.004798b0
mov dword [esi + 0x10], 0x47a1a0
mov dword [esi + 0x14], 0x47a130
mov dword [esi + 0x18], 0x479f90
mov dword [esi + 0x1c], 0x479760
mov dword [esi + 0x20], 0x479610
mov dword [esi + 0x24], 0x479d40
mov dword [esi + 0x28], 0x47a210
mov dword [esi + 0x30], 0x3b9aca00
mov eax, dword [esp + 8]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x38], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0x54
push str.JPEGMEM
mov dword [edi + 4], esi
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x479f6a
lea ecx, [esp + 0x10]
mov byte [esp + 0x10], 0x78
push ecx
lea ecx, [esp + 0xc]
push ecx
push str._ld_c
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x10
test eax, eax
jle 0x479f6a
mov al, byte [esp + 0x10]
cmp al, 0x6d
je 0x479f59
cmp al, 0x4d
mov eax, dword [esp + 8]
jne 0x479f61
imul eax, dword [esp + 8], 0x3e8
imul eax, eax, 0x3e8
mov dword [esi + 0x2c], eax
pop edi
pop esi
pop ecx
ret
Function at 0x47d730
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
cmp dword [ebp + 0x4c], 1
mov ebx, dword [ebp + 0x1c0]
mov dword [esp + 0x1c], ebx
jne 0x47d755
mov esi, 0x1fe
mov byte [ebx + 0x1c], 1
jmp 0x47d75b
xor esi, esi
mov byte [ebx + 0x1c], 0
push dword [ebp + 0x64]
mov ecx, dword [ebp + 4]
lea eax, [esi + 0x100]
push eax
push 1
push ebp
mov eax, dword [ecx + 8]
mov dword [esp + 0x20], esi
call eax
xor ecx, ecx
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x14]
add esp, 0x10
mov dword [esp + 0x14], ecx
cmp dword [ebp + 0x64], ecx
jle 0x47d870
push edi
lea ecx, [ecx]
mov edi, dword [ebx + ecx*4 + 0x20]
cdq
idiv edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], eax
test esi, esi
je 0x47d7ad
mov eax, dword [ebx + 0x18]
add dword [eax + ecx*4], 0xff
mov eax, dword [ebx + 0x18]
xor ebx, ebx
mov ebp, dword [eax + ecx*4]
lea eax, [edi + 0xfe]
lea ecx, [edi*2 - 2]
cdq
idiv ecx
xor esi, esi
mov edx, eax
lea esp, [esp]
cmp esi, edx
jle 0x47d806
mov ecx, dword [esp + 0x10]
lea edi, [edi*2 - 2]
imul eax, ebx, 0x1fe
add ecx, 0xfe
add ecx, eax
lea ecx, [ecx]
add ecx, 0x1fe
inc ebx
mov eax, ecx
cdq
idiv edi
mov edx, eax
cmp esi, edx
jg 0x47d7f0
mov edi, dword [esp + 0x10]
mov al, byte [esp + 0x1c]
imul bl
mov byte [esi + ebp], al
inc esi
cmp esi, 0xff
jle 0x47d7d0
mov esi, dword [esp + 0x14]
test esi, esi
je 0x47d851
mov ecx, 1
lea edx, [ebp - 1]
jmp 0x47d830
movzx eax, byte [ebp]
lea edx, [edx - 1]
mov byte [edx + 1], al
movzx eax, byte [ebp + 0xff]
mov byte [ecx + ebp + 0xff], al
inc ecx
cmp ecx, 0xff
jle 0x47d830
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [eax + 0x64]
mov eax, dword [esp + 0x1c]
jl 0x47d790
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x492862
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x4c64bc], 0
push ebx
push esi
mov esi, 0x4c64c4
jne 0x49288e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x4c64dc], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x4c64bc], 1
push dword [0x4c64dc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x49292b
push 0x14
push 8
push dword [0x4c4fd4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x492955
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4c64c0]
test eax, eax
je 0x4928d0
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x4c64c0], 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 0x49295a
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x4c64dc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x4c4fd4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x492955
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

Function at 0x492e79
Capabilities:
Set thread local storage value

Disassembly:
push esi
push 0x184
push 8
push dword [0x4c4fd4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
push dword [0x4c699c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [esp + 8]
mov dword [0x4c69a0], 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.00495a75
mov dword [esi + 0x58], 0x493a8c
mov eax, esi
mov dword [esi + 0x5c], 0x493ad8
mov dword [esi + 0x10], fcn.0049362d
mov dword [esi + 0x30], 0x49351f
mov dword [esi + 0x64], 0x493b62
mov dword [esi + 0x60], 0x493b1a
mov dword [esi + 0x34], 0x4931cf
mov dword [esi + 0x24], 0x4931a6
mov dword [esi + 0x28], 0x49317b
mov dword [esi + 0x2c], 0x4930cd
mov dword [esi + 0x44], 0x493892
pop esi
ret 4