joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10042ad0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push edi
cmp dword [ebx + 0x14], 0
jne 0x10042af3
push ebx
call fcn.10042300
mov dword [ebx + 0x14], 1
mov dword [ebx + 0xc], 0
mov esi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
mov ebp, dword [esp + 0x20]
sub eax, esi
add eax, dword [ebx + 4]
mov dword [esp + 0x10], esi
cmp esi, ebp
jl 0x10042b77
mov ecx, ebp
sub ecx, 1
je 0x10042b62
sub ecx, 1
je 0x10042b4b
sub ecx, 2
je 0x10042b36
push ebp
push eax
push dword [esp + 0x24]
call fcn.10025090
add esp, 0xc
mov eax, ebp
sub dword [ebx + 0xc], ebp
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
mov dword [eax], ecx
mov eax, ebp
sub dword [ebx + 0xc], ebp
pop ebp
pop ebx
pop ecx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
mov word [eax], cx
mov eax, ebp
sub dword [ebx + 0xc], ebp
pop ebp
pop ebx
pop ecx
ret 0xc
mov ecx, dword [esp + 0x1c]
mov dl, byte [eax]
mov eax, ebp
pop edi
pop esi
mov byte [ecx], dl
sub dword [ebx + 0xc], ebp
pop ebp
pop ebx
pop ecx
ret 0xc
push esi
push eax
mov eax, dword [esp + 0x24]
push eax
call fcn.10025090
mov eax, dword [esp + 0x28]
add esp, 0xc
mov edx, dword [ebx + 8]
add eax, esi
mov ecx, dword [ebx]
sub ebp, esi
mov dword [esp + 0x1c], eax
push 0
cmp ebp, edx
jl 0x10042bc0
lea edx, [esp + 0x1c]
push edx
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x18]
pop edi
add eax, esi
mov dword [ebx + 0xc], 0
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
lea eax, [esp + 0x1c]
push eax
push edx
push dword [ebx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [esp + 0x18]
cmp ebp, esi
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0xc], esi
mov dword [ebx + 0x10], esi
cmovle esi, ebp
push esi
push dword [ebx + 4]
push eax
call fcn.10025090
sub dword [ebx + 0xc], esi
add esp, 0xc
mov eax, dword [esp + 0x10]
add eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
Function at 0x10042c10
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], 0
cmp dword [edi + 0x1c], 0
jne 0x10042d27
cmp dword [edi + 0x14], 1
push ebx
push ebp
jne 0x10042c5d
mov eax, dword [edi + 0xc]
lea ecx, [esp + 0x10]
push 1
neg eax
cdq
push ecx
push eax
push dword [edi]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0xc], eax
mov eax, dword [edi + 0xc]
push esi
mov esi, dword [esp + 0x24]
cmp eax, esi
jle 0x10042ce6
mov ecx, dword [edi + 4]
sub ecx, eax
mov eax, esi
add ecx, dword [edi + 8]
sub eax, 1
je 0x10042ccf
sub eax, 1
je 0x10042cb6
sub eax, 2
je 0x10042c9f
push esi
push dword [esp + 0x24]
push ecx
call fcn.10025090
add esp, 0xc
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov ax, word [eax]
mov word [ecx], ax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov al, byte [eax]
mov byte [ecx], al
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
push edi
call fcn.10042300
mov eax, dword [edi + 8]
cmp esi, eax
jl 0x10042d15
push 0
lea eax, [esp + 0x20]
push eax
push esi
push dword [esp + 0x2c]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov ecx, dword [edi + 4]
sub ecx, dword [edi + 0xc]
push esi
push dword [esp + 0x24]
add ecx, eax
jmp 0x10042c87
xor eax, eax
pop edi
add esp, 8
ret 0xc
Function at 0x10045a89
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x14], edi
je 0x10045ae7
add ebx, 2
lea eax, [ebx*2 + 2]
push eax
push edi
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x10045ae7
cmp dword [ebp + 0xc], 0
je 0x10045ad6
push dword [ebp + 0xc]
push edi
call fcn.1016fba6
push 0x101a6024
push edi
call fcn.1016fc08
add esp, 0x10
jmp 0x10045ae3
push 0x101a6024
push edi
call fcn.1016fba6
pop ecx
pop ecx
mov esi, edi
jmp 0x10045aea
mov esi, dword [ebp + 0xc]
push 0
lea eax, [ebp + 0x10]
push eax
push ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x10045b53
mov eax, dword [0x101d96f8]
dec eax
sub eax, 1
je 0x10045b2d
sub eax, 0x16
je 0x10045b25
push 0
lea eax, [ebp + 0x10]
push eax
lea eax, [ebx + ebx]
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10045b53
push esi
call fcn.10158e50
jmp 0x10045b33
push esi
call fcn.10158bf0
mov esi, eax
lea eax, [ebp + 0x10]
push 0
push eax
push esi
call fcn.1016fc40
pop ecx
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call fcn.10158e40
test edi, edi
je 0x10045b66
push edi
push 0
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x10045b6d
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push esi
push edi
push dword [esp + 0xc]
xor esi, esi
push dword [0x101e2b2c]
call fcn.1004f6ff
mov edi, eax
test edi, edi
je 0x10045bc1
push esi
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x10045bc1
push esi
push dword [edi]
call fcn.10045c05
mov edi, eax
test edi, edi
je 0x10045bbb
call dword [sym.imp.USER32.dll_EmptyClipboard]
push edi
push 8
call dword [sym.imp.USER32.dll_SetClipboardData]
mov esi, eax
test esi, esi
jne 0x10045bbb
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call dword [sym.imp.USER32.dll_CloseClipboard]
pop edi
mov eax, esi
pop esi
ret 4
Function at 0x10046153
Capabilities:
Hash data using sha1

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [esp + 8]
and dword [ecx + 0x18], 0
and dword [ecx + 0x14], 0
mov dword [ecx], 0x67452301
mov dword [ecx + 4], 0xefcdab89
mov dword [ecx + 8], 0x98badcfe
mov dword [ecx + 0xc], 0x10325476
mov dword [ecx + 0x10], 0xc3d2e1f0
mov dword [ecx + 0x5c], eax
ret
Function at 0x100476d0
Capabilities:
Encode data using base64

Disassembly:
sub esp, 8
test byte [esp + 0x1c], 0x10
mov ecx, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
mov eax, dword [esp + 0x14]
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
mov ebp, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov dword [esp + 0x10], eax
mov esi, eax
cmovne ebp, ecx
mov dword [esp + 0xc], esi
push edi
test ebx, ebx
jle 0x1004778b
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
add ecx, 0xfffffffc
mov dword [esp + 0x20], ecx
mov edx, eax
mov dword [esp + 0x24], edi
sub edx, esi
cmp ebx, 3
jae 0x100477df
mov esi, dword [esp + 0x2c]
and esi, 0x20
cmp ebx, 2
jne 0x1004779c
test esi, esi
je 0x1004773a
mov ecx, dword [esp + 0x28]
add ecx, 0xfffffffd
cmp edx, ecx
jge 0x1004784f
movzx ecx, byte [edi]
movzx edx, byte [edi + 1]
shl ecx, 0xa
mov edi, dword [esp + 0x24]
shl edx, 2
add edi, 2
or edx, ecx
mov ecx, edx
shr ecx, 0xc
movzx ecx, byte [ecx + ebp]
mov byte [eax], cl
mov ecx, edx
shr ecx, 6
and edx, 0x3f
and ecx, 0x3f
movzx ecx, byte [ecx + ebp]
mov byte [eax + 1], cl
movzx ecx, byte [edx + ebp]
mov byte [eax + 2], cl
add eax, 3
test esi, esi
jne 0x10047837
mov byte [eax], 0x3d
inc eax
pop edi
pop esi
pop ebp
mov byte [eax], 0
sub eax, dword [esp + 8]
pop ebx
add esp, 8
ret 0x14
test esi, esi
je 0x100477a7
mov ecx, dword [esp + 0x28]
add ecx, 0xfffffffe
cmp edx, ecx
jge 0x1004784f
movzx edx, byte [edi]
inc edi
shl edx, 4
mov ecx, edx
and edx, 0x3f
shr ecx, 6
movzx ecx, byte [ecx + ebp]
mov byte [eax], cl
movzx ecx, byte [edx + ebp]
mov byte [eax + 1], cl
add eax, 2
test esi, esi
jne 0x10047837
mov ecx, 0x3d3d
mov word [eax], cx
add eax, 2
jmp 0x10047837
cmp edx, ecx
jge 0x1004784f
movzx edx, byte [edi]
movzx ecx, byte [edi + 1]
movzx esi, byte [edi + 2]
add edi, 3
shl ecx, 8
shl edx, 0x10
or edx, ecx
or esi, edx
mov ecx, esi
shr ecx, 6
and ecx, 0x3f
movsx edx, byte [ecx + ebp]
mov ecx, esi
and ecx, 0x3f
movsx ecx, byte [ecx + ebp]
shl ecx, 8
or edx, ecx
mov ecx, esi
shr ecx, 0xc
and ecx, 0x3f
shl edx, 8
shr esi, 0x12
movsx ecx, byte [ecx + ebp]
or edx, ecx
movsx ecx, byte [esi + ebp]
shl edx, 8
or edx, ecx
mov dword [eax], edx
add eax, 4
sub ebx, 3
test ebx, ebx
jle 0x1004778b
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
jmp 0x10047712
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 0x14
Function at 0x10047ac0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x94
test dword [esp + 0xa0], 0x10000
je 0x10047c46
push ebx
mov ebx, dword [esp + 0x9c]
test ebx, ebx
je 0x10047c45
mov eax, dword [ebx]
mov ecx, dword [esp + 0xa8]
cdq
and edx, 7
push ebp
mov ebp, dword [ebx + 4]
add eax, edx
sar eax, 3
test ecx, ecx
push esi
push edi
mov edi, 0x101a11a0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xb8]
cmovne edi, ecx
cmp eax, 0x18
jne 0x10047b31
push edi
call fcn.10158e50
mov edi, eax
mov esi, edi
lea eax, [esi + 1]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x10047b26
sub esi, eax
jmp 0x10047b69
cmp eax, 0x19
jne 0x10047b53
mov esi, edi
lea ecx, [esi + 2]
nop dword [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10047b40
sub esi, ecx
sar esi, 1
add esi, esi
jmp 0x10047b69
push edi
call fcn.10158bf0
mov edi, eax
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x10047b60
sub esi, ecx
push esi
push edi
cmp esi, ebp
jle 0x10047bb8
mov esi, dword [esp + 0xb4]
push ebx
mov eax, dword [esi + 0xc]
call eax
mov eax, dword [esi + 0x10]
push ebx
call eax
push dword [esp + 0x10]
lea eax, [ebx + 8]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.10025090
mov eax, ebp
sub eax, dword [esp + 0x1c]
push eax
lea eax, [esp + 0x24]
add eax, dword [esp + 0x20]
push 0
push eax
call fcn.10024f30
mov eax, dword [esi + 8]
add esp, 0x18
push 1
push ebx
call eax
jmp 0x10047bd8
lea eax, [esp + 0x1c]
push eax
call fcn.10025090
mov eax, ebp
sub eax, esi
push eax
lea eax, [esp + 0x24]
add eax, esi
push 0
push eax
call fcn.10024f30
add esp, 0x18
push ebp
lea eax, [esp + 0x18]
push eax
lea esi, [ebx + 0x48]
push esi
call fcn.10025090
add esp, 0xc
test ebp, ebp
jle 0x10047c05
lea eax, [esp + 0x14]
mov ecx, ebp
xor byte [eax], 0x36
lea eax, [eax + 1]
xor byte [esi], 0x5c
lea esi, [esi + 1]
sub ecx, 1
jne 0x10047bf4
push ebp
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0xb4]
push ebx
mov eax, dword [eax + 0xc]
call eax
mov eax, dword [esp + 0xb8]
cmp eax, 0x18
jne 0x10047c37
push edi
call fcn.10158e40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14
cmp eax, 0x19
je 0x10047c42
push edi
call fcn.10158be0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14

Function at 0x10048007
Capabilities:
Set thread local storage value

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
xor ebx, ebx
push edi
mov edi, ebx
test esi, esi
je 0x10048064
push esi
call dword [esi + 0x58]
mov ecx, dword [esi + 0x80]
mov edi, eax
mov dword [esi + 0x94], ecx
mov ecx, dword [esi + 0x84]
mov dword [esi + 0x98], ecx
test edi, edi
jne 0x10048064
mov eax, dword [esi + 0x70]
test eax, eax
je 0x10048043
push ebx
push esi
call eax
push esi
push ebx
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push dword [0x101e2b30]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x101e2b34], ebx
mov eax, edi
pop edi
pop esi
pop ebx
ret 4
Function at 0x100480b5
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x101e2b30]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [esp + 0xc]
mov ecx, dword [eax + 0x90]
add ecx, dword [esp + 0xc]
push ecx
mov ecx, dword [eax + 0x8c]
add ecx, dword [esp + 0xc]
push ecx
push eax
call dword [eax + 0x50]
ret 0xc

Function at 0x10048169
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [0x101e2b30]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [ebp + 0x18]
cmp eax, dword [esi + 0xac]
je 0x10048191
push eax
push esi
mov dword [esi + 0xac], eax
call dword [esi + 0x40]
push dword [ebp + 0x14]
mov eax, dword [esi + 0x90]
push dword [ebp + 0x10]
add eax, dword [ebp + 0xc]
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call dword [esi + 4]
pop esi
pop ebp
ret 0x14

Function at 0x100481b4
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push dword [0x101e2b30]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [ebp + 0x14], 0
mov ecx, eax
jle 0x100481f2
cmp dword [ebp + 0x18], 0
jle 0x100481f2
push dword [ebp + 0x18]
mov eax, dword [ecx + 0x90]
push dword [ebp + 0x14]
add eax, dword [ebp + 0x10]
push eax
mov eax, dword [ecx + 0x8c]
add eax, dword [ebp + 0xc]
push eax
push dword [ebp + 8]
push ecx
call dword [ecx + 0x28]
pop ebp
ret 0x14

Function at 0x1004827c
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x101e2b30]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x90]
add ecx, dword [esp + 0xc]
push ecx
mov ecx, dword [eax + 0x8c]
add ecx, dword [esp + 0xc]
push ecx
push dword [esp + 0xc]
push eax
call dword [eax + 0x24]
ret 0xc

Function at 0x10048327
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x101e2b30]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x90]
add ecx, dword [esp + 8]
push ecx
mov ecx, dword [eax + 0x8c]
add ecx, dword [esp + 8]
push ecx
push eax
call dword [eax + 0x54]
ret 8

Function at 0x10048cfc
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
push esi
push edi
xor edi, edi
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push SysReAllocStringLen
push dword [esp + 0x2c]
mov ebp, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10048d80
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
push edi
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x10048d78
push ebp
lea eax, [esp + 0x1c]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10048d69
cmp dword [esp + 0x18], ebx
jne 0x10048d69
push ebx
push edi
push dword [esp + 0x1c]
call fcn.10048a69
mov ebp, eax
push edi
push 0
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc
Function at 0x100496dc
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
push ebp
xor ebp, ebp
cmp dword [0x101e1bdc], ebp
je 0x100498c2
push ebx
mov ebx, dword [esp + 0x60]
push edi
test ebx, ebx
je 0x100496fc
mov edi, ebx
jmp 0x1004970e
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
test edi, edi
je 0x100498c0
lea eax, [esp + 0x18]
push eax
push 0x18
push dword [esp + 0x68]
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x100498b5
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push esi
mov esi, dword [esp + 0x24]
push 0x2c
push 0
push eax
mov dword [esp + 0x20], ebp
call fcn.10024f30
add esp, 0xc
mov dword [esp + 0x34], 0x28
xor eax, eax
mov dword [esp + 0x38], ebp
inc eax
mov dword [esp + 0x3c], esi
mov word [esp + 0x40], ax
xor ecx, ecx
push 0x20
pop eax
push ecx
push ecx
mov word [esp + 0x4a], ax
lea eax, [esp + 0x18]
push eax
push ecx
lea eax, [esp + 0x44]
mov dword [esp + 0x54], ecx
push eax
push edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x100498b4
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x18]
push esi
push 0
push dword [esp + 0x78]
push edi
call dword [sym.imp.GDI32.dll_GetDIBits]
imul esi, dword [esp + 0x14]
test esi, esi
jle 0x100498b4
cmp dword [esp + 0x6c], 0
je 0x10049861
mov ebp, dword [esp + 0x10]
push 0xa
pop ebx
movzx ecx, byte [ebp + 1]
xor edx, edx
movzx eax, byte [ebp + 2]
lea eax, [eax + ecx*2]
movzx ecx, byte [ebp]
imul eax, eax, 3
add eax, ecx
div ebx
mov cl, al
cmp cl, 0x40
jae 0x100497f5
movzx eax, cl
sub eax, 0x40
imul eax, eax, 7
cdq
idiv ebx
lea ecx, [eax + 0x40]
jmp 0x1004980b
cmp cl, 0xc0
jbe 0x1004980b
movzx eax, cl
sub eax, 0xc0
imul eax, eax, 7
cdq
idiv ebx
lea ecx, [eax - 0x40]
movzx eax, byte [ebp + 3]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
movzx eax, cl
movd xmm0, eax
divss xmm1, dword [0x101a6464]
cvtdq2ps xmm0, xmm0
mulss xmm1, xmm0
cvttss2si ecx, xmm1
mov byte [ebp], cl
mov eax, dword [esp + 0x10]
mov byte [eax + 1], cl
mov ecx, dword [esp + 0x10]
mov al, byte [ecx]
mov byte [ecx + 2], al
mov ebp, dword [esp + 0x10]
add ebp, 4
mov dword [esp + 0x10], ebp
sub esi, 1
jne 0x100497c5
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x18]
jmp 0x100498b4
mov edx, dword [esp + 0x10]
mov al, byte [edx + 3]
cmp al, 0xff
jae 0x100498a8
movzx ecx, al
movzx eax, byte [edx]
imul ecx, eax
shr ecx, 8
mov byte [edx], cl
mov edx, dword [esp + 0x10]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 3]
imul ecx, eax
shr ecx, 8
mov byte [edx + 1], cl
mov edx, dword [esp + 0x10]
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 2]
imul ecx, eax
shr ecx, 8
mov byte [edx + 2], cl
mov edx, dword [esp + 0x10]
add edx, 4
mov dword [esp + 0x10], edx
sub esi, 1
jne 0x10049865
pop esi
test ebx, ebx
jne 0x100498c0
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop ebx
mov eax, ebp
pop ebp
add esp, 0x50
ret 0xc
Function at 0x1004aa60
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x1004aa98
push 0
lea ecx, [esp + 0x10]
push ecx
push esi
push dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1004aa93
xor eax, eax
cmp dword [esp + 0xc], esi
pop edi
sete al
pop esi
ret
pop edi
xor eax, eax
pop esi
ret
mov eax, dword [edi + 4]
add eax, dword [edi + 8]
push esi
push dword [esp + 0x14]
push eax
call fcn.10025090
add dword [edi + 8], esi
add esp, 0xc
mov eax, 1
pop edi
pop esi
ret
Function at 0x1004b3ee
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xc
push ebx
push esi
mov esi, dword [esp + 0x3c]
xor ebx, ebx
cmp esi, 1
je 0x1004b41e
cmp esi, 2
je 0x1004b41e
cmp esi, 4
je 0x1004b41e
cmp esi, 8
je 0x1004b41e
cmp esi, 0x18
je 0x1004b41e
cmp esi, 0x20
je 0x1004b41e
xor eax, eax
jmp 0x1004b5eb
mov ecx, dword [0x101e1c00]
push ebp
push edi
xor edi, edi
mov dword [esp + 0x10], edi
test ecx, ecx
jle 0x1004b5e7
mov edx, dword [esp + 0x28]
mov eax, dword [edi*4 + 0x101e2bbc]
cmp dword [eax], edx
je 0x1004b451
inc edi
mov dword [esp + 0x10], edi
cmp edi, ecx
jl 0x1004b438
jmp 0x1004b5e7
cmp dword [esp + 0x38], 0x20
jne 0x1004b5be
mov eax, dword [eax + 8]
test eax, eax
je 0x1004b491
cmp esi, 0x20
je 0x1004b46d
cmp esi, 0xffffffff
jne 0x1004b491
push esi
push dword [esp + 0x44]
push dword [esp + 0x44]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call eax
jmp 0x1004b5e5
mov eax, dword [esp + 0x2c]
inc eax
imul ebp, eax, 3
and ebp, 0xfffffffc
mov eax, ebp
mov dword [esp + 0x14], ebp
imul eax, dword [esp + 0x30]
push eax
push 0
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x1004b5e7
mov ebx, dword [esp + 0x30]
test ebx, ebx
jle 0x1004b589
mov edx, dword [esp + 0x24]
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ecx
mov esi, edx
test eax, eax
jle 0x1004b568
mov ebp, ecx
mov edi, eax
mov ecx, 0xff
movzx eax, byte [esi + 2]
sub eax, ecx
movzx ecx, byte [esi + 3]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp + 2], al
movzx eax, byte [esi + 1]
sub eax, ecx
movzx ecx, byte [esi + 3]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp + 1], al
movzx eax, byte [esi]
lea esi, [esi + 4]
sub eax, ecx
movzx ecx, byte [esi - 1]
imul eax, ecx
mov ecx, 0xff
add eax, 0xfe01
cdq
idiv ecx
mov byte [ebp], al
lea ebp, [ebp + 3]
sub edi, 1
jne 0x1004b4f7
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
add edx, dword [esp + 0x34]
add ecx, ebp
sub dword [esp + 0x24], 1
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], ecx
jne 0x1004b4e4
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x10]
mov eax, dword [edi*4 + 0x101e2bbc]
push esi
push dword [esp + 0x44]
mov esi, dword [esp + 0x20]
push dword [esp + 0x44]
push ebp
push ebx
push dword [esp + 0x40]
push esi
push dword [esp + 0x3c]
call dword [eax + 4]
push esi
push 0
push dword [0x101df4f0]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1004b5e7
cmp dword [esp + 0x38], 0x18
jne 0x1004b5e7
push esi
push dword [esp + 0x44]
push dword [esp + 0x44]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call dword [eax + 4]
mov ebx, eax
pop edi
mov eax, ebx
pop ebp
pop esi
pop ebx
add esp, 0xc
ret 0x28
Function at 0x1004f0c7
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x101e1c10]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x1004f128
push esi
push dword [0x101e1c0c]
push 8
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x101e1c10]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x101e1c08]
jmp 0x1004f118
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x1004f116
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x1004f106
push edi
push 0x1004f065
call fcn.1000f49e
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

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

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
mov ecx, edi
and ecx, 3
je 0x1004f148
push 4
pop eax
sub eax, ecx
add edi, eax
mov esi, dword [0x101e1c0c]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test esi, esi
jne 0x1004f181
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push edi
push 8
push dword [0x101df4f0]
mov dword [0x101e1c10], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x101e1c10]
call ebx
mov esi, dword [0x101e1c0c]
lea eax, [edi + esi]
push eax
push dword [0x101e1c10]
mov dword [0x101e1c0c], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x101df4f0]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x101e1c10]
call ebx
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test edi, edi
jne 0x1004f1c0
test ebx, ebx
je 0x1004f1e1
push 0x14
push 0x101e1c08
call fcn.1004fa63
pop ecx
pop ecx
mov dword [eax], esi
mov dword [eax + 4], edi
mov dword [eax + 8], ebx
test edi, edi
je 0x1004f1e1
lea ecx, [esi + ebp]
push ecx
call edi
pop ecx
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 0xc

Function at 0x1004fb90
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x101d978c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [esp + 0x18]
mov edi, eax
mov ebp, dword [esp + 0x14]
mov esi, dword [edi + 8]
mov ecx, dword [ebp]
sub esi, ebx
lea eax, [esi + 0xa]
push eax
test ecx, ecx
jne 0x1004fbc9
push ecx
push dword [0x101e2c4c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x1004fbd8
push ecx
push 0
push dword [0x101e2c4c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
shr esi, 1
mov dword [ebp], ecx
mov eax, dword [edi]
push esi
add eax, ebx
push eax
push ecx
call fcn.1004ffc0
mov dword [edi + 8], ebx
pop edi
pop esi
pop ebp
pop ebx
ret 8

Function at 0x1004fca0
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x101d978c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
add dword [eax + 8], 2
ret