joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4021d3
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040cdd0
push 0xa
mov eax, 0x452038
push eax
push dword [esp + 0x24]
call sub.KERNEL32.dll_FindResourceW
mov dword [esp], eax
cmp dword [esp], 0
je 0x40230b
push dword [esp]
push dword [esp + 0x20]
call sub.KERNEL32.dll_LoadResource
mov dword [esp + 4], eax
push dword [esp]
push dword [esp + 0x20]
call sub.KERNEL32.dll_SizeofResource
mov dword [0x454a60], eax
cmp dword [esp + 4], 0
je 0x40223a
mov ebx, dword [0x454a60]
and ebx, ebx
jle 0x40223a
mov eax, 1
jmp 0x40223c
xor eax, eax
and eax, eax
je 0x40230b
push 0x7d0
call fcn.0040a8f0
mov dword [esp + 8], eax
push 2
push 0x7d0
push dword [esp + 0x10]
push dword [0x454a60]
push dword [esp + 0x14]
call fcn.00404aad
mov dword [esp + 0xc], eax
cmp dword [esp + 0xc], 0
je 0x402302
push edx
call fcn.0040ce60
pop edx
push eax
push edx
call fcn.0040ce60
pop edx
push eax
push edx
call fcn.0040ce60
pop edx
push eax
push edx
call fcn.0040ce60
pop edx
push eax
push 0x3e8
push dword [esp + 0x1c]
call fcn.0040a9a0
call fcn.004031e2
add dword [esp], edx
call fcn.0040a750
lea eax, [0x454ab0]
push eax
call fcn.0040cf60
cmp dword [0x454a90], 0
je 0x4022fa
mov edx, dword [0x454a64]
push edx
call fcn.0040ce60
pop edx
push eax
push edx
call fcn.0040cea0
mov edx, dword [0x454ab0]
push edx
call fcn.0040cea0
lea eax, [0x454ab0]
push eax
call fcn.0040cf60
mov dword [esp + 0x10], 1
push dword [esp + 8]
call fcn.0040a970
mov eax, dword [esp + 0x10]
jmp 0x402313
add esp, 0x14
pop ebx
ret 4

Function at 0x402d1b
Capabilities:
Get common file path

Disassembly:
xor eax, eax
push eax
push eax
call fcn.0040cdd0
push dword [esp + 0xc]
call fcn.00403200
push 0x400
call fcn.0040a8f0
mov dword [esp], eax
push edx
call fcn.0040ce60
pop edx
push eax
push edx
call fcn.0040ce60
pop edx
push eax
call fcn.0040ae97
lea eax, [esp + 8]
push eax
call fcn.0040cf60
push dword [esp]
push 0
mov eax, 0x452026
push eax
push dword [esp + 0x10]
call sub.KERNEL32.dll_GetTempFileNameW
push edx
call fcn.0040ce60
pop edx
push eax
push edx
call fcn.0040ce60
pop edx
push eax
push 0xffffffff
push dword [esp + 0xc]
call fcn.0040a9a0
lea eax, [0x454aa0]
push eax
call fcn.0040cf60
push dword [0x454aa0]
call fcn.0040ac24
push dword [esp]
call fcn.0040a970
push dword [0x454aa0]
call fcn.0040aefa
mov edx, dword [0x454aa0]
push edx
call fcn.0040ce60
pop edx
push eax
push edx
call fcn.0040cea0
pop eax
push eax
call fcn.004031d0
pop edx
add eax, edx
jmp 0x402de2
push dword [esp + 4]
call fcn.0040ce30
add esp, 8
ret
Function at 0x4037a7
Capabilities:
Create thread

Disassembly:
push ecx
push ebp
push esi
lea eax, [esp + 8]
xor esi, esi
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, eax
test ebp, ebp
je 0x40383f
push edi
push 0x454f8c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x454ac8]
test edi, edi
je 0x403813
push ebx
push esi
lea ebx, [edi + 8]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40380c
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
push ebx
push 0x454ac8
call fcn.0040cca6
pop ecx
pop ecx
jmp 0x40380e
mov edi, dword [edi]
test edi, edi
jne 0x4037e3
pop ebx
mov eax, dword [0x452140]
mov esi, eax
inc eax
push 0x10
push 0x454ac8
mov dword [0x452140], eax
call fcn.0040cce6
pop ecx
pop ecx
push 0x454f8c
mov dword [eax], ebp
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebp
pop ecx
ret 8

Function at 0x40387a
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
push 0
push edi
call fcn.004036d7
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ebx, 0x454f8c
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x454ac8]
jmp 0x4038ab
cmp dword [esi + 0xc], edi
je 0x4038b1
mov esi, dword [esi]
test esi, esi
jne 0x4038a4
jmp 0x4038c9
add esi, 8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0x454ac8
call fcn.0040cca6
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
ret 4

Function at 0x4039f7
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x403a4c
push dword [esp + 0x10]
push 0x403976
call dword [sym.imp.USER32.DLL_EnumWindows]
mov esi, dword [0x454acc]
test esi, esi
je 0x403aa5
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x403a44
cmp byte [esi + 0x10], 0
je 0x403a44
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x403a20
jmp 0x403aa5
mov esi, dword [0x454acc]
test esi, esi
je 0x403aa5
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x403a9e
cmp byte [esi + 0x11], 0
je 0x403a7a
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x403a91
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
push ebp
push 0x454acc
call fcn.0040cca6
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x403a59
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x40457c
Capabilities:
Delete file

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
xor edi, edi
test esi, esi
je 0x4045db
cmp word [esi], di
je 0x4045db
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.0041dc60
push dword [esp + 0x1c]
mov ebx, eax
push ebx
call dword [esp + 0x20]
push esi
push ebx
call fcn.0041df10
add esp, 0x10
test eax, eax
jne 0x4045da
push 0x24
push 8
push dword [0x454a34]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov eax, dword [esp + 0x10]
mov dword [ecx + 0x14], edi
mov edi, ecx
mov dword [ecx], ebx
mov dword [ecx + 8], 1
mov dword [eax + 4], ecx
pop ebx
mov eax, edi
pop edi
pop esi
ret 0x10

Function at 0x4064c1
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
call dword [sym.imp.USER32.DLL_GetFocus]
mov esi, dword [sym.imp.USER32.DLL_GetKeyState]
mov ebx, eax
test ebx, ebx
je 0x40653b
push 9
call esi
test al, al
jns 0x40653b
push 0x11
call esi
test al, al
js 0x40653b
push 0x10
call esi
test al, al
js 0x40653b
push 0x12
call esi
test al, al
js 0x40653b
push 5
lea eax, [ebp - 0x10]
push eax
push ebx
call dword [sym.imp.USER32.DLL_GetClassNameW]
push 4
lea eax, [ebp - 0x10]
push str.Rich
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x40653b
push eax
push eax
push 0x44e
push ebx
call dword [sym.imp.USER32.DLL_SendMessageW]
test eax, 0x800
jne 0x40653b
xor eax, eax
jmp 0x4065bc
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x406563
push 0x11
call esi
test al, al
js 0x40655b
push 0x10
call esi
test al, al
js 0x40655b
push 0x12
call esi
test al, al
jns 0x406563
push 1
push edi
call fcn.004065c4
mov esi, dword [sym.imp.USER32.DLL_GetPropW]
test ebx, ebx
je 0x406579
push str.PB_Hotkey
push ebx
call esi
test eax, eax
jne 0x4065b9
push str.PB_WindowID
push edi
call esi
mov esi, eax
test esi, esi
je 0x4065b9
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.USER32.DLL_GetWindowThreadProcessId]
test eax, eax
je 0x4065b9
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 4], eax
jne 0x4065b9
lea eax, [esi - 1]
push eax
push dword [0x455068]
call fcn.0040c577
test eax, eax
je 0x4065b9
mov eax, dword [eax + 8]
jmp 0x4065bb
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x406f17
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x454dbc], eax
test eax, eax
je 0x406f45
push str.AlphaBlend
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x454db8], eax
lea eax, [ebp - 0x114]
mov dword [0x454dc0], 1
push eax
mov dword [ebp - 0x114], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x406fa7
cmp dword [ebp - 0x104], 1
jne 0x406f7c
and dword [0x454dc0], 0
jmp 0x406fbf
cmp dword [ebp - 0x104], 2
jne 0x406fa7
cmp dword [ebp - 0x110], 5
jb 0x406f73
jne 0x406fa7
mov eax, dword [ebp - 0x10c]
neg eax
sbb eax, eax
and eax, dword [0x454dc0]
mov dword [0x454dc0], eax
jmp 0x406fac
mov eax, dword [0x454dc0]
test eax, eax
je 0x406fbf
call fcn.00406d82
neg eax
sbb eax, eax
and dword [0x454dc0], eax
mov esp, ebp
pop ebp
ret

Function at 0x4084a0
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 0x4084d2
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 0x4084cd
cmp dword [esp + 0xc], esi
je 0x4084e9
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 sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [edi + 8], esi
pop edi
mov eax, 1
pop esi
ret

Function at 0x40abf6
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [esp + 4], 0
je 0x40ac1f
test byte [esp + 8], 2
je 0x40ac13
push pe_nt_image_headers32
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40ac21
xor eax, eax
ret 8
Function at 0x40ad4d
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x40ae88
push ebp
xor ebp, ebp
cmp word [eax], bp
je 0x40ae87
push 0x104
push eax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x220], ax
lea eax, [esp + 0x18]
push eax
call sub.MSVCRT.dll_wcslen
mov ecx, eax
add esp, 0x10
lea eax, [esp + ecx*2 + 0xa]
cmp ecx, 2
je 0x40ada9
cmp ecx, 3
jne 0x40ade3
cmp word [esp + 0xe], 0x3a
jne 0x40ade3
cmp ecx, 2
jne 0x40adc7
lea eax, [esp + 0xc]
push 0x4458c0
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x40ae87
push 0xfffffffffffffffe
pop edi
jmp 0x40ae87
push ebx
push 0x5c
pop ebx
movzx ecx, word [eax]
cmp cx, bx
je 0x40adf4
cmp ecx, 0x2f
jne 0x40adfe
xor ecx, ecx
mov word [eax], cx
sub eax, 2
jmp 0x40ade7
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x40ae3f
test byte [esp + 0x21c], 0x10
je 0x40ae24
push 0xfffffffffffffffe
pop edi
jmp 0x40ae36
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
or esi, ebp
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x40ae86
cmp word [esp + 0x10], bx
jne 0x40ae4d
cmp word [esp + 0x12], bx
je 0x40ae5e
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x40ae86
cmp word [esp + 0x12], ax
jne 0x40ae86
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x40ae73
test al, 0x10
je 0x40ae86
jmp 0x40ae83
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x40ae86
push 0xfffffffffffffffe
pop edi
pop ebx
pop ebp
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4

Function at 0x40aefa
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
cmp dword [ebp + 8], 0
je 0x40af72
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [ebp - 4], ax
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcslen
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea eax, [ecx + eax*2]
jmp 0x40af53
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x40af50
cmp ecx, 0x5c
je 0x40af50
cmp ecx, 0x2f
jne 0x40af5d
add eax, 0xfffffffe
lea ecx, [ebp - 0x20c]
cmp eax, ecx
ja 0x40af3d
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x40af74
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40aff0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x40b02c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4
Function at 0x40c406
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x454e68]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x40c467
push esi
push dword [0x454e64]
push 8
push dword [0x454a34]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x454e68]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x454e60]
jmp 0x40c457
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x40c455
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x40c445
push edi
push 0x40c3a4
call fcn.0043dc42
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

Function at 0x40c471
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 0x40c487
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x454e64]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x40c4be
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
push 8
push dword [0x454a34]
mov dword [0x454e68], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x454e68]
call ebx
mov eax, dword [0x454e64]
mov edi, eax
add eax, esi
push eax
push dword [0x454e68]
mov dword [0x454e64], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x454a34]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x454e68]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x40c4fe
test ebx, ebx
je 0x40c51f
push 0x14
push 0x454e60
call fcn.0040cce6
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x40c51f
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 0x40cf00
Capabilities:
Get thread local storage value

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

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x452164]
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 0x40cfa6
mov ecx, dword [ebp - 4]
add ecx, 0xa
push ecx
push 0
mov edx, dword [0x4551bc]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x40cfc7
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 [0x4551bc]
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.0040d270
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8

Function at 0x40d0f0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x452164]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x40d114
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 0x40d162
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 [0x4551bc]
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 0x40d190
Capabilities:
Get thread local storage value

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

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

Function at 0x40d3a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x452164]
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 0x40d610
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
mov ecx, dword [esp + 0xc]
push ebx
push ebp
push esi
xor ebp, ebp
lea eax, [ecx + 0x32350]
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], eax
jmp 0x40d630
xor ebx, ebx
mov edi, ebp
lea eax, [ebx + 1]
lea ebp, [ebx + 4]
lea ebx, [ebx]
movzx edx, word [ecx + eax*2 + 0x329f4]
mov esi, edi
and esi, 1
shr edx, 4
mov ecx, esi
shr edi, 1
neg ecx
add eax, eax
sar ecx, 4
or eax, esi
and ecx, 0x7f
xor edx, ecx
mov ecx, dword [esp + 0x1c]
add ebx, dword [ecx + edx*4 + 0x30ca0]
dec ebp
jne 0x40d640
mov edx, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
inc ebp
mov dword [esp + 0x10], ebp
mov dword [edx], ebx
add edx, 4
mov dword [esp + 0x14], edx
cmp ebp, 0x10
jb 0x40d630
pop edi
pop esi
pop ebp
mov dword [ecx + 0x32390], 0
pop ebx
add esp, 8
ret
Function at 0x40d6a0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x214
push ebx
push ebp
push esi
mov ebx, 4
push edi
mov edi, dword [esp + 0x228]
mov dword [esp + 0x10], ebx
lea ebx, [ebx]
movzx eax, byte [edi + ebx + 0x304a0]
mov ebp, eax
mov dword [esp + 0x20], eax
mov edx, eax
shr ebp, 1
and edx, 1
dec ebp
or edx, 2
mov ecx, ebp
shl edx, cl
mov eax, ebx
sub eax, edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x14], eax
lea esi, [eax + 1]
test ebp, ebp
je 0x40d742
mov ebx, dword [esp + 0x1c]
lea ebx, [ebx]
mov eax, esi
mov edx, ebx
sub eax, dword [esp + 0x20]
and edx, 1
add eax, dword [esp + 0x18]
add esi, esi
shr ebx, 1
or esi, edx
movzx ecx, word [edi + eax*2 + 0x3290e]
mov eax, edx
neg eax
shr ecx, 4
sar eax, 4
and eax, 0x7f
xor ecx, eax
mov eax, dword [esp + 0x14]
add eax, dword [edi + ecx*4 + 0x30ca0]
mov dword [esp + 0x14], eax
dec ebp
jne 0x40d700
mov ebx, dword [esp + 0x10]
mov dword [esp + ebx*4 + 0x24], eax
inc ebx
mov dword [esp + 0x10], ebx
cmp ebx, 0x80
jb 0x40d6c0
lea eax, [esp + 0x24]
mov dword [esp + 0x1c], 4
sub eax, edi
lea ebp, [edi + 0x31750]
lea esi, [edi + 0x32710]
mov dword [esp + 0x18], ebp
lea edx, [edi + 0x31b58]
mov dword [esp + 0x10], esi
sub eax, 0x31b50
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], eax
lea esp, [esp]
xor ebx, ebx
cmp dword [edi + 0x32394], ebx
jbe 0x40d7f0
lea ebx, [ebx]
mov eax, ebx
xor esi, esi
or eax, 0x40
cmp eax, 1
je 0x40d7db
mov ebp, dword [esp + 0x10]
mov edx, eax
and eax, 1
shr edx, 1
neg eax
sar eax, 4
and eax, 0x7f
movzx ecx, word [ebp + edx*2]
shr ecx, 4
xor ecx, eax
mov eax, edx
add esi, dword [edi + ecx*4 + 0x30ca0]
cmp eax, 1
jne 0x40d7b0
mov ebp, dword [esp + 0x18]
mov dword [ebp + ebx*4], esi
inc ebx
cmp ebx, dword [edi + 0x32394]
jb 0x40d7a0
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, 0xe
cmp dword [edi + 0x32394], ecx
jbe 0x40d817
lea ecx, [ecx]
mov eax, ecx
shr eax, 1
sub eax, 5
shl eax, 4
add dword [ebp + ecx*4], eax
inc ecx
cmp ecx, dword [edi + 0x32394]
jb 0x40d800
mov eax, dword [ebp]
mov ecx, 4
mov ebx, dword [esp + 0x20]
mov dword [edx - 8], eax
mov eax, dword [ebp + 4]
mov dword [edx - 4], eax
mov eax, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 0xc]
mov dword [edx + 4], eax
add edx, 8
lea ebx, [ebx]
movzx eax, byte [edi + ecx + 0x304a0]
lea edx, [edx + 4]
inc ecx
mov eax, dword [ebp + eax*4]
add eax, dword [ebx + edx - 4]
mov dword [edx - 4], eax
cmp ecx, 0x80
jb 0x40d840
mov edx, dword [esp + 0x14]
sub esi, 0xffffff80
add ebp, 0x100
mov dword [esp + 0x10], esi
add edx, 0x200
mov dword [esp + 0x18], ebp
sub ebx, 0x200
mov dword [esp + 0x14], edx
dec dword [esp + 0x1c]
mov dword [esp + 0x20], ebx
jne 0x40d790
mov dword [edi + 0x3baf8], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x214
ret