joyce8/EMBER2024-capa huggingface dataset:
Function at 0x534a36
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
xor edi, edi
call dword [sym.imp.USER32.dll_GetFocus]
mov ebp, dword [esp + 0x3c]
mov ebx, eax
and dword [esp + 0x10], edi
push str.PB_WindowID
push ebp
call dword [sym.imp.USER32.dll_GetPropW]
mov esi, eax
push 9
pop eax
test esi, esi
je 0x534ace
lea eax, [esp + 0x14]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x534acb
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x14], eax
jne 0x534acb
lea eax, [esi - 1]
push eax
push dword [0x7311c8]
call fcn.00541e01
mov edi, eax
mov dword [esp + 0x10], 1
xor eax, eax
push 9
cmp dword [edi + 0x10], eax
jle 0x534acd
mov edx, dword [edi + 4]
xor ecx, ecx
pop esi
cmp word [ecx + edx + 2], si
jne 0x534ac2
mov esi, 0xfa01
push 9
cmp word [ecx + edx + 4], si
je 0x534bb5
pop esi
inc eax
add ecx, 6
cmp eax, dword [edi + 0x10]
jl 0x534aa8
push 9
pop eax
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
test ebx, ebx
je 0x534b74
push eax
call esi
test al, al
jns 0x534b74
push 0x11
call esi
test al, al
js 0x534b74
push 0x10
call esi
test al, al
js 0x534b74
push 0x12
call esi
test al, al
js 0x534b74
push 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
cmp dword [esp + 0x10], 0
jne 0x534b74
push 5
lea eax, [esp + 0x1c]
push str.RichE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
je 0x534b48
push 4
lea eax, [esp + 0x1c]
push str.RICHE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x534b5f
push 0
push 0
push 0x44e
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, 0x800
je 0x534bbf
lea eax, [esp + 0x18]
push str.Scintilla
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x534bbf
test ebp, ebp
je 0x534b98
push 0x11
call esi
test al, al
js 0x534b90
push 0x10
call esi
test al, al
js 0x534b90
push 0x12
call esi
test al, al
jns 0x534b98
push 1
push ebp
call fcn.00534bcb
test ebx, ebx
je 0x534bac
push str.PB_Hotkey
push ebx
call dword [sym.imp.USER32.dll_GetPropW]
test eax, eax
jne 0x534bbf
test edi, edi
je 0x534bbf
mov eax, dword [edi + 8]
jmp 0x534bc1
and dword [esp + 0x14], 0
jmp 0x534acd
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 4

Function at 0x5375ca
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push esi
push edi
push dword [esp + 0xc]
xor esi, esi
push dword [0x7312bc]
call fcn.00541e01
mov edi, eax
test edi, edi
je 0x53761e
push esi
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x53761e
push esi
push dword [edi]
call fcn.00537660
mov edi, eax
test edi, edi
je 0x537618
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 0x537618
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 0x5379ea
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push edi
xor edi, edi
push edi
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x537a5f
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x537a08
mov esi, 0x5ecbe8
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
lea ebp, [eax*2 + 2]
push ebp
push 0x2002
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x537a56
call dword [sym.imp.USER32.dll_EmptyClipboard]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x537a56
push ebp
push esi
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
push 0xd
call dword [sym.imp.USER32.dll_SetClipboardData]
mov edi, eax
call dword [sym.imp.USER32.dll_CloseClipboard]
pop esi
pop ebp
pop ebx
mov eax, edi
pop edi
ret 4

Function at 0x537a65
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor esi, esi
push esi
mov ebx, esi
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x537aa6
push 0xd
call dword [sym.imp.USER32.dll_GetClipboardData]
mov edi, eax
test edi, edi
je 0x537a9e
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x537a9e
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
mov ebx, eax
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x537aa9
mov edi, dword [ebp + 8]
push dword [ebp + 8]
push ebx
call fcn.00542650
test esi, esi
je 0x537ad1
lea ecx, [ebx*2 + 2]
push ecx
push esi
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x537ad6
xor ecx, ecx
mov word [eax], cx
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x537edc
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 0x537f39
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 0x537f39
mov eax, dword [esi + 0x70]
test eax, eax
je 0x537f18
push ebx
push esi
call eax
push esi
push ebx
push dword [0x72a674]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push dword [0x7312c0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x7312c4], ebx
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x537fdf
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [0x7312c0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [ebp + 0x18]
cmp eax, dword [esi + 0xac]
je 0x538007
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 0x53802a
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x7312c0]
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 0x538057
Capabilities:
Get thread local storage value

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

Function at 0x5380b4
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push edi
push dword [0x7312c0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x14]
mov ebx, eax
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
add ecx, dword [ebx + 0x90]
add ebp, dword [ebx + 0x8c]
mov dword [esp + 0x14], ecx
test edi, edi
je 0x538128
push esi
mov esi, dword [esp + 0x20]
test esi, esi
je 0x538127
test edi, edi
jns 0x5380f5
inc edi
jmp 0x5380f6
dec edi
test esi, esi
jns 0x5380fd
inc esi
jmp 0x5380fe
dec esi
mov eax, dword [esp + 0x24]
cmp eax, dword [ebx + 0xac]
je 0x538119
push eax
push ebx
mov dword [ebx + 0xac], eax
call dword [ebx + 0x40]
mov ecx, dword [esp + 0x18]
lea eax, [ecx + esi]
push eax
lea eax, [edi + ebp]
push eax
push ecx
push ebp
push ebx
call dword [ebx + 0x48]
pop esi
pop edi
pop ebp
pop ebx
ret 0x14

Function at 0x53812e
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [0x7312c0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [ebp + 0x18]
cmp eax, dword [esi + 0xac]
je 0x538156
push eax
push esi
mov dword [esi + 0xac], eax
call dword [esi + 0x40]
mov eax, dword [esi + 0x90]
mov ecx, dword [esi + 0x34]
add eax, dword [ebp + 0xc]
test ecx, ecx
je 0x538180
fld dword [ebp + 0x14]
push ecx
fstp dword [esp]
push dword [ebp + 0x10]
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call ecx
jmp 0x538192
push dword [ebp + 0x10]
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call dword [esi + 0x30]
pop esi
pop ebp
ret 0x14
Function at 0x538197
Capabilities:
Get thread local storage value

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

Function at 0x53821a
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push edi
push dword [0x7312c0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x14]
mov ebx, eax
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
add ecx, dword [ebx + 0x90]
add ebp, dword [ebx + 0x8c]
mov dword [esp + 0x14], ecx
test edi, edi
je 0x538290
push esi
mov esi, dword [esp + 0x20]
test esi, esi
je 0x53828f
test edi, edi
jns 0x53825b
inc edi
jmp 0x53825c
dec edi
test esi, esi
jns 0x538263
inc esi
jmp 0x538264
dec esi
mov eax, dword [ebx + 0xa4]
cmp eax, dword [ebx + 0xac]
je 0x538281
push eax
push ebx
mov dword [ebx + 0xac], eax
call dword [ebx + 0x40]
mov ecx, dword [esp + 0x18]
lea eax, [ecx + esi]
push eax
lea eax, [edi + ebp]
push eax
push ecx
push ebp
push ebx
call dword [ebx + 0x48]
pop esi
pop edi
pop ebp
pop ebx
ret 0x10

Function at 0x538296
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [0x7312c0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [ebp + 0x14]
cmp eax, dword [esi + 0xac]
je 0x5382be
push eax
push esi
mov dword [esi + 0xac], eax
call dword [esi + 0x40]
mov eax, dword [esi + 0x90]
mov ecx, dword [esi + 0xc]
add eax, dword [ebp + 0xc]
push dword [ebp + 0x10]
test ecx, ecx
je 0x5382e1
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call ecx
jmp 0x5382f3
push dword [ebp + 0x10]
push eax
mov eax, dword [esi + 0x8c]
add eax, dword [ebp + 8]
push eax
push esi
call dword [esi + 0x38]
pop esi
pop ebp
ret 0x10
Function at 0x5393aa
Capabilities:
Set thread local storage value

Disassembly:
push esi
push 0x10c
push 8
push dword [0x72a674]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
push dword [0x7312c0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x7312c4], esi
mov eax, esi
and dword [esi + 0xa8], 0
or dword [esi + 0xac], 0xffffffff
or dword [esi + 0xb0], 0xffffffff
mov dword [esi + 0xa4], 0xffffff
mov dword [esi + 0x74], 1
mov dword [esi + 0x78], 7
mov dword [esi], 0x538456
mov dword [esi + 4], 0x538476
mov dword [esi + 8], 0x5391a6
mov dword [esi + 0xc], 0x53850e
mov dword [esi + 0x10], 0x538a24
mov dword [esi + 0x14], 0x5389b6
mov dword [esi + 0x18], 0x5389f4
mov dword [esi + 0x1c], 0x538a0c
mov dword [esi + 0x20], fcn.00538a80
mov dword [esi + 0x24], 0x538885
mov dword [esi + 0x28], fcn.005386da
mov dword [esi + 0x2c], 0x5385f1
mov dword [esi + 0x30], 0x53894c
mov dword [esi + 0x34], 0x5388a1
mov dword [esi + 0x38], 0x538afd
mov dword [esi + 0x3c], 0x538c0e
mov dword [esi + 0x40], 0x538cb2
mov dword [esi + 0x44], 0x538d49
mov dword [esi + 0x48], 0x538e47
mov dword [esi + 0x4c], 0x539028
mov dword [esi + 0x50], 0x538e98
mov dword [esi + 0x54], 0x5390ea
mov dword [esi + 0x58], 0x5391e5
mov dword [esi + 0x5c], 0x5392a0
mov dword [esi + 0x60], 0x539318
mov dword [esi + 0x64], 0x53935e
pop esi
ret

Function at 0x53a2c3
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
push ebx
mov ebx, dword [esp + 0x5c]
push ebp
xor ebp, ebp
push esi
test ebx, ebx
je 0x53a2d7
mov esi, ebx
jmp 0x53a2e1
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov esi, eax
test esi, esi
je 0x53a3d2
lea eax, [esp + 0x18]
push eax
push 0x18
pop eax
push eax
push dword [esp + 0x68]
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x53a3c7
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push edi
mov edi, dword [esp + 0x24]
push 0x2c
push 0
push eax
mov dword [esp + 0x20], ebp
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [esp + 0x34], 0x28
xor eax, eax
mov dword [esp + 0x38], ebp
inc eax
mov dword [esp + 0x3c], edi
mov word [esp + 0x40], ax
xor ecx, ecx
push 0x18
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 esi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x53a3c6
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x18]
push edi
push 0
push dword [esp + 0x78]
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
imul edi, dword [esp + 0x14]
test edi, edi
jle 0x53a3c6
mov ebx, dword [esp + 0x10]
push 3
pop ebp
movzx ecx, byte [ebx + 1]
movzx eax, byte [ebx + 2]
add eax, ecx
movzx ecx, byte [ebx]
add eax, ecx
cdq
idiv ebp
mov byte [ebx], al
mov ecx, dword [esp + 0x10]
mov byte [ecx + 1], al
mov ecx, dword [esp + 0x10]
mov byte [ecx + 2], al
mov ebx, dword [esp + 0x10]
add ebx, ebp
mov dword [esp + 0x10], ebx
dec edi
jne 0x53a38f
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x18]
pop edi
test ebx, ebx
jne 0x53a3d2
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x50
ret 8
Function at 0x53bb06
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push 0x601940
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x730bec], eax
test eax, eax
je 0x53bb34
push str.AlphaBlend
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x730be8], eax
lea eax, [ebp - 0x114]
mov dword [0x730bf0], 1
push eax
mov dword [ebp - 0x114], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x53bb96
cmp dword [ebp - 0x104], 1
jne 0x53bb6b
and dword [0x730bf0], 0
jmp 0x53bbae
cmp dword [ebp - 0x104], 2
jne 0x53bb96
cmp dword [ebp - 0x110], 5
jb 0x53bb62
jne 0x53bb96
mov eax, dword [ebp - 0x10c]
neg eax
sbb eax, eax
and eax, dword [0x730bf0]
mov dword [0x730bf0], eax
jmp 0x53bb9b
mov eax, dword [0x730bf0]
test eax, eax
je 0x53bbae
call fcn.0053b30c
neg eax
sbb eax, eax
and dword [0x730bf0], eax
mov esp, ebp
pop ebp
ret

Function at 0x53cc10
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 0x53cc42
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 0x53cc3d
cmp dword [esp + 0xc], esi
je 0x53cc59
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 0x53d5af
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 0x53d5df
cmp esi, 2
je 0x53d5df
cmp esi, 4
je 0x53d5df
cmp esi, 8
je 0x53d5df
cmp esi, 0x18
je 0x53d5df
cmp esi, 0x20
je 0x53d5df
xor eax, eax
jmp 0x53d7a9
mov ecx, dword [0x730c4c]
push ebp
push edi
xor edi, edi
mov dword [esp + 0x10], edi
test ecx, ecx
jle 0x53d7a5
mov edx, dword [esp + 0x28]
mov eax, dword [edi*4 + 0x731350]
cmp dword [eax], edx
je 0x53d612
inc edi
mov dword [esp + 0x10], edi
cmp edi, ecx
jl 0x53d5f9
jmp 0x53d7a5
cmp dword [esp + 0x38], 0x20
jne 0x53d77c
mov eax, dword [eax + 8]
test eax, eax
je 0x53d652
cmp esi, 0x20
je 0x53d62e
cmp esi, 0xffffffff
jne 0x53d652
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 0x53d7a3
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 [0x72a674]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x53d7a5
mov ebx, dword [esp + 0x30]
test ebx, ebx
jle 0x53d747
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 0x53d727
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]
dec edi
jne 0x53d6b8
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
dec dword [esp + 0x24]
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], ecx
jne 0x53d6a5
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x10]
mov eax, dword [edi*4 + 0x731350]
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 [0x72a674]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x53d7a5
cmp dword [esp + 0x38], 0x18
jne 0x53d7a5
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 0x5417c1
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x730c90]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x541822
push esi
push dword [0x730c8c]
push 8
push dword [0x72a674]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x730c90]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x730c88]
jmp 0x541812
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x541810
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x541800
push edi
push 0x54175f
call fcn.005e28e8
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

Function at 0x54182c
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 0x541842
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x730c8c]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x541879
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
push 8
push dword [0x72a674]
mov dword [0x730c90], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x730c90]
call ebx
mov eax, dword [0x730c8c]
mov edi, eax
add eax, esi
push eax
push dword [0x730c90]
mov dword [0x730c8c], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x72a674]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x730c90]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x5418b9
test ebx, ebx
je 0x5418da
push 0x14
push 0x730c88
call fcn.0054216a
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x5418da
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 0x542280
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x7261b0]
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 0x5422c6
mov ecx, dword [ebp - 4]
add ecx, 0xa
push ecx
push 0
mov edx, dword [0x7313d4]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x5422e7
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 [0x7313d4]
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.00542990
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8
Function at 0x542370
Capabilities:
Get thread local storage value

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

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x7261b0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x542674
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 0x5426c4
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 [0x7313d4]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
jmp 0x54270c
mov edx, dword [ebp - 4]
cmp dword [edx + 4], 0x100000
jle 0x54270c
cmp dword [ebp - 8], 0x100000
jge 0x5426e0
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 [0x7313d4]
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 0x542730
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x7261b0]
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