joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bbad
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push dword [ebp + 8]
xor ebx, ebx
push dword [0x499994]
mov dword [ebp - 8], ebx
xor edi, edi
call fcn.00412b5a
mov esi, eax
cmp esi, ebx
je 0x40bd28
mov eax, dword [esi]
mov dword [ebp - 4], eax
cmp dword [esi + 0x14], ebx
je 0x40bc5d
push dword [ebp + 8]
call fcn.0040c1d6
jmp 0x40bbf0
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 0x1d], bl
jne 0x40bbe8
push dword [esi + 0x14]
call fcn.0040c4ae
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x20], eax
push ebx
mov eax, esi
mov byte [esi + 0x1c], 1
call fcn.0040ba8a
pop ecx
lea eax, [ebp + 0xc]
push eax
push ebx
push esi
push 0x40baff
push 0x2000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
je 0x40bc32
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x10], 0xffffffff
je 0x40bc43
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0040c26c
mov eax, dword [esi]
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0x34]
mov esi, dword [esi]
mov eax, dword [esi]
push 1
push ebx
push ebx
push esi
call dword [eax + 0x30]
jmp 0x40bd28
test byte [ebp + 0xc], 1
je 0x40bc66
xor edi, edi
inc edi
test byte [ebp + 0xc], 2
je 0x40bcf0
push esi
call fcn.0040bd42
lea eax, [esi + 4]
push 0xc
push eax
call fcn.00413160
pop ecx
pop ecx
lea edx, [ebp - 4]
push edx
push dword [ebp - 4]
mov dword [ebp - 8], eax
mov eax, dword [0x4999a8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
test eax, eax
jne 0x40bd28
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
push dword [esi + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x44]
mov eax, dword [ebp - 4]
push dword [esi + 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x40]
cmp dword [ebp + 0x10], 0xffffffff
je 0x40bcd6
push dword [ebp - 8]
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0040c206
jmp 0x40bce2
mov eax, dword [ebp - 4]
push dword [esi + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push edi
push ebx
push ebx
push eax
call dword [ecx + 0x30]
jmp 0x40bd28
mov ecx, dword [eax]
push eax
call dword [ecx + 0x48]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0x34]
cmp dword [ebp + 0x10], 0xffffffff
je 0x40bd11
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0040c26c
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push edi
push ebx
push ebx
push eax
call dword [ecx + 0x30]
test eax, eax
jne 0x40bd28
mov dword [ebp - 8], 1
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40c64e
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
je 0x40c666
push dword [esp + 4]
push 0x40c5e7
call dword [sym.imp.USER32.DLL_EnumWindows]
jmp 0x40c6a3
push esi
mov esi, dword [0x4999d4]
test esi, esi
je 0x40c6a2
push ebx
push edi
mov ebx, dword [esi]
lea edi, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi], eax
jne 0x40c69a
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_EnableWindow]
push edi
push 0x4999d4
call fcn.0041318d
pop ecx
pop ecx
test ebx, ebx
mov esi, ebx
jne 0x40c673
pop edi
pop ebx
pop esi
ret 4
Function at 0x40cd41
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [0x4999e4], 0
jne 0x40cd53
call fcn.0040cc92
push esi
push edi
push dword [0x4999e0]
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call edi
mov esi, eax
test esi, esi
jne 0x40cd78
call fcn.0040cc92
push dword [0x4999e0]
call edi
mov esi, eax
mov eax, dword [ebp + 8]
push 0x11
lea ecx, [esi + 8]
pop edx
mov edi, eax
imul edi, edi, 0x53a9b4fb
xor eax, eax
inc eax
sub eax, edi
mov dword [ecx + 0x44], eax
imul eax, eax, 0x53a9b4fb
xor edi, edi
inc edi
sub edi, eax
mov eax, edi
mov dword [ecx], eax
add ecx, 4
dec edx
jne 0x40cd81
and dword [esi], edx
push 0x1f
mov dword [esi + 4], 0xa
pop edi
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 4]
push eax
mov eax, esi
call fcn.0040cc49
dec edi
pop ecx
pop ecx
jne 0x40cdb2
pop edi
pop esi
leave
ret 4
Function at 0x410100
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
call dword [sym.imp.USER32.DLL_GetFocus]
test eax, eax
mov edi, dword [sym.imp.USER32.DLL_GetPropA]
mov dword [ebp - 4], eax
je 0x41018b
mov esi, dword [sym.imp.USER32.DLL_GetKeyState]
push 9
call esi
test al, al
jns 0x41017d
push 0x11
call esi
test al, al
js 0x41017d
push 0x10
call esi
test al, al
js 0x41017d
push 0x12
call esi
test al, al
js 0x41017d
push 5
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
call dword [sym.imp.USER32.DLL_GetClassNameA]
push 4
lea eax, [ebp - 0xc]
push str.Rich
push eax
call sub.MSVCRT.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x41017d
push eax
push eax
push 0x44e
push dword [ebp - 4]
call dword [sym.imp.USER32.DLL_SendMessageA]
test ax, 0x800
je 0x4101ab
push str.PB_Hotkey
push dword [ebp - 4]
call edi
test eax, eax
jne 0x4101ab
push str.PB_WindowID
push dword [ebp + 8]
call edi
test eax, eax
je 0x4101ab
dec eax
push eax
push dword [0x499f78]
call fcn.00412b5a
mov eax, dword [eax + 8]
jmp 0x4101ad
xor eax, eax
pop edi
pop esi
leave
ret 4

Function at 0x410537
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x248
push esi
or esi, 0xffffffff
test eax, eax
push edi
mov edi, esi
je 0x410648
cmp byte [eax], 0
je 0x410648
push 0x104
push eax
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_strncpy
lea eax, [ebp - 0x108]
push eax
mov byte [ebp - 4], 0
call sub.MSVCRT.dll_strlen
add esp, 0x10
cmp eax, 2
lea ecx, [ebp + eax - 0x109]
je 0x410591
cmp eax, 3
jne 0x4105ce
cmp byte [ebp - 0x107], 0x3a
jne 0x4105ce
cmp eax, 2
jne 0x4105b2
lea eax, [ebp - 0x108]
push 0x447288
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 1
jbe 0x410648
jmp 0x410642
mov byte [ecx], 0
dec ecx
cmp byte [ecx], 0x5c
je 0x4105ca
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x41061a
test byte [ebp - 0x248], 0x10
je 0x4105fd
push 0xfffffffffffffffe
pop edi
or esi, 0xffffffff
jmp 0x410611
mov ecx, dword [ebp - 0x228]
mov esi, dword [ebp - 0x22c]
xor edi, edi
xor edx, edx
or edi, ecx
or esi, edx
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x410648
cmp byte [ebp - 0x108], 0x5c
jne 0x410648
cmp byte [ebp - 0x107], 0x5c
jne 0x410648
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x410648
test al, 0x10
je 0x410648
push 0xfffffffffffffffe
or esi, 0xffffffff
pop edi
mov eax, edi
pop edi
mov edx, esi
pop esi
leave
ret 4
Function at 0x410660
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
xor eax, eax
cmp dword [esi + 0x14], eax
mov dword [esp + 4], eax
jne 0x410695
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 8]
mov eax, dword [esp + 4]
mov dword [esi + 0xc], ecx
pop esi
pop ecx
ret 4

Function at 0x4108b0
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0x10]
xor eax, eax
test edi, edi
mov dword [esp + 4], eax
je 0x410909
push esi
mov esi, dword [esp + 0x18]
test esi, esi
je 0x410908
mov eax, dword [esp + 0x10]
mov ecx, dword [0x499f90]
push eax
push ecx
call fcn.00412b5a
test eax, eax
je 0x410904
cmp dword [eax + 4], 0
je 0x4108f2
push esi
push edi
push eax
call fcn.00410c70
pop esi
pop edi
pop ecx
ret 0xc
mov eax, dword [eax]
push 0
lea edx, [esp + 0xc]
push edx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop esi
pop edi
pop ecx
ret 0xc

Function at 0x410910
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x14]
push ebx
push ebp
push edi
push eax
push 0x1000
mov dword [esp + 0x1c], 0x1000
call fcn.00413630
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x499f90]
push ecx
mov edi, eax
push edx
mov ebp, edi
call fcn.00412b5a
mov ebx, eax
test ebx, ebx
je 0x410a2e
push esi
lea ecx, [ecx]
mov byte [esp + 0x13], 0
cmp dword [ebx + 4], 0
je 0x41096e
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00410d70
mov dword [esp + 0x14], eax
jmp 0x410985
mov eax, dword [ebx]
push 0
lea ecx, [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x1f]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov al, byte [esp + 0x13]
test al, al
je 0x410997
mov byte [ebp], al
mov al, byte [esp + 0x13]
add ebp, 1
mov ecx, dword [esp + 0x18]
mov esi, ebp
sub esi, edi
cmp esi, ecx
jl 0x4109c1
mov edx, dword [esp + 0x24]
add ecx, 0x1000
push edx
push ecx
mov dword [esp + 0x20], ecx
call fcn.00413630
mov edi, eax
mov al, byte [esp + 0x13]
lea ebp, [esi + edi]
test al, al
je 0x410a2d
cmp dword [esp + 0x14], 0
je 0x4109d8
cmp al, 0xd
je 0x4109d8
cmp al, 0xa
jne 0x410950
sub ebp, 1
cmp al, 0xd
jne 0x410a2d
cmp dword [ebx + 4], 0
je 0x4109f4
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00410d70
jmp 0x410a0b
mov eax, dword [ebx]
push 0
lea ecx, [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x1f]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x410a2d
cmp dword [ebx + 4], 0
je 0x410a1e
add dword [ebx + 0xc], 1
jmp 0x410a2d
mov ecx, dword [ebx]
push 1
push 0
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop esi
sub edi, ebp
add edi, dword [esp + 0x14]
mov byte [ebp], 0
push edi
call fcn.004136d0
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 8
Function at 0x410a50
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
mov ecx, dword [0x499f90]
push esi
push eax
push ecx
mov dword [esp + 0xc], 0
call fcn.00412b5a
mov esi, eax
test esi, esi
je 0x410ad4
cmp dword [esi + 4], 0
je 0x410aa3
push 1
lea edx, [esp + 8]
push edx
push esi
call fcn.00410d70
test eax, eax
je 0x410a97
add dword [esi + 0xc], 1
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
mov edx, dword [esi]
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x410adf
cmp dword [esp + 8], 0
je 0x410adf
mov eax, dword [esi]
push 1
push 0
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4

Function at 0x410b50
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x499f90]
push eax
push ecx
mov byte [esp + 0xb], 0
call fcn.00412b5a
test eax, eax
je 0x410b9a
cmp dword [eax + 4], 0
lea edx, [esp + 3]
je 0x410b87
push 1
push edx
push eax
call fcn.00410d70
movzx eax, byte [esp + 3]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, byte [esp + 3]
pop ecx
ret 4

Function at 0x410bb0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x499f90]
push eax
push ecx
mov dword [esp + 8], 0
call fcn.00412b5a
test eax, eax
je 0x410bfa
cmp dword [eax + 4], 0
lea edx, [esp]
je 0x410be7
push 4
push edx
push eax
call fcn.00410d70
mov eax, dword [esp]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp]
pop ecx
ret 4

Function at 0x410c10
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x499f90]
push eax
push ecx
mov byte [esp + 0xb], 0
call fcn.00412b5a
test eax, eax
je 0x410c5a
cmp dword [eax + 4], 0
lea edx, [esp + 3]
je 0x410c47
push 1
push edx
push eax
call fcn.00410d70
movsx eax, byte [esp + 3]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, byte [esp + 3]
pop ecx
ret 4
Function at 0x410c70
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 1
push edi
mov dword [esp + 8], 0
jne 0x410ca5
mov eax, dword [esi + 0xc]
mov ecx, dword [esi]
push 1
push 0
neg eax
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], edx
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ecx, edi
jle 0x410d1e
mov eax, dword [esi + 8]
add eax, dword [esi + 4]
sub eax, ecx
mov ecx, edi
sub ecx, 1
je 0x410d0b
sub ecx, 1
je 0x410cf6
sub ecx, 2
je 0x410ce3
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov dword [eax], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cx, word [edx]
mov word [eax], cx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [edx]
mov byte [eax], cl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
push esi
call fcn.00410660
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x410d4b
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push 0
lea edx, [esp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x14]
push edi
push edx
add ecx, eax
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
Function at 0x410d70
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 0
push edi
jne 0x410d91
push esi
call fcn.00410660
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ebx, edi
jl 0x410e0a
mov eax, dword [esi + 0x10]
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
sub ecx, 1
je 0x410df7
sub ecx, 1
je 0x410de2
sub ecx, 2
je 0x410dcf
push edi
push eax
mov eax, dword [esp + 0x1c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov edx, dword [esp + 0x14]
mov dword [edx], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ax, word [eax]
mov ecx, dword [esp + 0x14]
mov word [ecx], ax
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov dl, byte [eax]
mov eax, dword [esp + 0x14]
mov byte [eax], dl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esi + 0x10]
push ebp
mov ebp, dword [esp + 0x18]
sub ecx, ebx
add ecx, dword [esi + 4]
push ebx
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
cmp edi, eax
push 0
jl 0x410e53
mov eax, dword [esi]
lea edx, [esp + 0x18]
push edx
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
pop esi
add eax, ebx
pop ebx
ret 0xc
mov edx, dword [esi + 4]
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp edi, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jle 0x410e76
mov edi, eax
mov ecx, dword [esi + 4]
push edi
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
add esp, 0xc
pop ebp
lea eax, [ebx + edi]
pop edi
pop esi
pop ebx
ret 0xc

Function at 0x4111b1
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x499f94]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [esp + 0xc]
push dword [esp + 0xc]
push dword [esp + 0xc]
push eax
call dword [eax + 0x24]
ret 0xc

Function at 0x411f50
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x94
push edi
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor edi, edi
cmp eax, edi
mov dword [0x499b94], eax
je 0x411f83
push str.AlphaBlend
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x499b98], eax
lea eax, [ebp - 0x1c]
push eax
mov dword [0x499b90], 1
mov dword [ebp - 0x1c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x411fc1
cmp dword [ebp - 0xc], 1
je 0x411fd2
cmp dword [ebp - 0xc], 2
jne 0x411fc1
cmp dword [ebp - 0x18], 5
jb 0x411fd2
jne 0x411fc1
cmp dword [ebp - 0x14], edi
jne 0x411fc1
mov dword [0x499b90], edi
cmp dword [0x499b90], edi
je 0x411fd8
call fcn.00411e97
test eax, eax
jne 0x411fd8
mov dword [0x499b90], edi
pop edi
add ebp, 0x78
leave
ret
Function at 0x412cb5
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x499b9c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x412d16
push esi
push dword [0x499ba4]
push 8
push dword [0x49923c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x499b9c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x499ba0]
jmp 0x412d06
mov eax, dword [esi + 0xc]
test eax, eax
je 0x412d04
mov ecx, dword [esi + 8]
add ecx, edi
push ecx
call eax
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x412cf4
push edi
push 0x412c7a
call fcn.0043c9fd
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

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

Disassembly:
push ebx
mov ebx, dword [esp + 8]
mov eax, ebx
and eax, 3
push esi
push edi
je 0x412d35
push 4
pop ecx
sub ecx, eax
add ebx, ecx
cmp dword [0x499ba4], 0
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
jne 0x412d67
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push ebx
push 8
push dword [0x49923c]
mov dword [0x499b9c], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x499b9c]
call esi
mov edi, dword [0x499ba4]
add dword [0x499ba4], ebx
push dword [0x499ba4]
push dword [0x499b9c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x49923c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebx, eax
push ebx
push dword [0x499b9c]
call esi
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x412dad
cmp dword [esp + 0x18], esi
je 0x412dd1
push 0x14
push 0x499ba0
call fcn.00413160
test esi, esi
pop ecx
pop ecx
mov ecx, dword [esp + 0x18]
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
je 0x412dd1
add ebx, edi
push ebx
call esi
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc

Function at 0x413240
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x488e70]
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 0x413286
mov ecx, dword [ebp - 4]
add ecx, 5
push ecx
push 0
mov edx, dword [0x49a01c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x4132a7
mov edx, dword [ebp - 4]
add edx, 5
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [0x49a01c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
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.00413780
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8
Function at 0x413330
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x488e70]
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, 1
mov eax, dword [ebp - 4]
mov dword [eax + 8], edx
mov esp, ebp
pop ebp
ret

Function at 0x4133f0
Capabilities:
Get thread local storage value

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

Function at 0x413500
Capabilities:
Get thread local storage value

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x488e70]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0xc], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x413654
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 8]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
add ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 4]
sub eax, 4
cmp dword [ebp - 8], eax
jl 0x4136a1
mov ecx, dword [ebp - 8]
add ecx, 0x4000
mov edx, dword [ebp - 0xc]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
add ecx, 5
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
push eax
push 0
mov ecx, dword [0x49a01c]
push ecx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
add ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
add edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
mov dword [eax + 8], edx
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 8

Function at 0x413700
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x488e70]
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 0x41373e
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 0x41373e
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub ecx, dword [eax]
add ecx, 1
mov eax, ecx
jmp 0x413740
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x42c9f0
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
xor edx, edx
cmp ecx, edx
je 0x42ca91
push ebx
push ebp
push esi
mov esi, dword [ecx]
mov byte [esi + 0x16], dl
mov esi, dword [ecx]
mov byte [esi + 0x17], dl
mov esi, dword [ecx]
mov byte [esi + 0x18], dl
mov esi, dword [ecx]
mov byte [esi + 0x19], dl
mov esi, dword [ecx + 4]
xor eax, eax
cmp esi, edx
push edi
jle 0x42ca3f
mov edi, dword [ecx]
movzx ebx, byte [edi + edx]
mov ebp, eax
shr ebp, 0x18
xor ebx, ebp
shl eax, 8
xor eax, dword [ebx*4 + 0x447590]
add edx, 1
cmp edx, esi
jl 0x42ca21
xor edx, edx
mov esi, dword [ecx + 0xc]
cmp esi, edx
jle 0x42ca6c
mov edi, dword [ecx + 8]
lea esp, [esp]
movzx ebx, byte [edi + edx]
mov ebp, eax
shr ebp, 0x18
xor ebx, ebp
shl eax, 8
xor eax, dword [ebx*4 + 0x447590]
add edx, 1
cmp edx, esi
jl 0x42ca50
mov edx, dword [ecx]
mov byte [edx + 0x16], al
mov esi, dword [ecx]
mov edx, eax
shr edx, 8
mov byte [esi + 0x17], dl
mov esi, dword [ecx]
mov edx, eax
shr edx, 0x10
pop edi
mov byte [esi + 0x18], dl
mov ecx, dword [ecx]
pop esi
shr eax, 0x18
pop ebp
mov byte [ecx + 0x19], al
pop ebx
ret