joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a660
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
push 0x20
push dword [ebp + 8]
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 8], ecx
call fcn.0040af74
xor eax, eax
push 4
xor ecx, ecx
mov dword [ebp + 8], eax
xor ebx, ebx
pop edx
cmp eax, 0xa
jg 0x40a76e
cmp ebx, edx
jge 0x40a6b5
lea esi, [ebp + ebx*4 - 0x28]
mov dword [ebp - 4], esi
cmp ecx, edx
jge 0x40a6b7
mov edi, dword [ebp - 8]
lea esi, [ecx + eax*4]
lea edi, [edi + esi*4 + 0x14]
mov esi, dword [ebp - 4]
add dword [ebp - 4], edx
inc ebx
inc ecx
cmp ebx, edx
movsd dword es:[edi], dword [esi]
jl 0x40a69a
cmp ecx, edx
jne 0x40a6bf
inc eax
mov dword [ebp + 8], eax
xor ecx, ecx
cmp ebx, edx
jl 0x40a686
cmp eax, 0xa
jg 0x40a76e
mov dword [ebp - 4], 0x4186a8
movzx esi, byte [ebp - 0x1b]
mov al, byte [ebp - 0x28]
xor al, byte [esi + 0x4187c8]
movzx esi, byte [ebp - 0x1a]
mov bl, byte [esi + 0x4187c8]
movzx esi, byte [ebp - 0x19]
xor byte [ebp - 0x27], bl
mov bl, byte [esi + 0x4187c8]
movzx esi, byte [ebp - 0x1c]
xor byte [ebp - 0x26], bl
mov bl, byte [esi + 0x4187c8]
mov esi, dword [ebp - 4]
xor al, byte [esi]
xor byte [ebp - 0x25], bl
inc dword [ebp - 4]
push 3
mov byte [ebp - 0x28], al
lea eax, [ebp - 0x24]
pop edi
xor esi, esi
mov bl, byte [eax + esi - 4]
xor byte [eax + esi], bl
inc esi
cmp esi, edx
jl 0x40a71a
add eax, edx
dec edi
jne 0x40a718
xor ebx, ebx
cmp dword [ebp + 8], 0xa
jg 0x40a76e
cmp ebx, edx
jge 0x40a757
lea eax, [ebp + ebx*4 - 0x28]
cmp ecx, edx
jge 0x40a759
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 8]
lea esi, [ecx + esi*4]
lea edi, [edi + esi*4 + 0x14]
mov esi, eax
inc ebx
add eax, edx
inc ecx
cmp ebx, edx
movsd dword es:[edi], dword [esi]
jl 0x40a73b
cmp ecx, edx
jne 0x40a760
inc dword [ebp + 8]
xor ecx, ecx
cmp ebx, edx
jl 0x40a72d
cmp dword [ebp + 8], 0xa
jle 0x40a6d3
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x40a775
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
add ecx, 0x24
push 4
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], 9
pop edi
xor eax, eax
mov ecx, dword [ebp - 4]
lea esi, [ebp + eax - 0x1c]
add ecx, 2
mov dword [ebp - 8], edi
movzx edx, byte [ecx + 1]
movzx ebx, byte [ecx - 1]
mov dl, byte [eax + edx*4 + 0x4156a8]
xor dl, byte [eax + ebx*4 + 0x415ea8]
movzx ebx, byte [ecx - 2]
xor dl, byte [eax + ebx*4 + 0x4162a8]
movzx ebx, byte [ecx]
xor dl, byte [eax + ebx*4 + 0x415aa8]
add ecx, edi
mov byte [esi], dl
add esi, edi
dec dword [ebp - 8]
jne 0x40a79d
inc eax
cmp eax, edi
jl 0x40a790
push 0x10
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 4]
call fcn.0040af74
add dword [ebp - 4], 0x10
dec dword [ebp - 0xc]
jne 0x40a78e
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40babc
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x18], 0
and dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
ret 4
Function at 0x405a90
Capabilities:
Get graphical window text
Write file on windows

Disassembly:
push ebp
mov ecx, 0x104
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x25c
lea ebx, [ebp - 0x128]
mov dword [esp + 8], ecx
mov esi, dword [ebp + 8]
mov dword [esp + 4], ebx
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleFileNameA
sub esp, 0xc
add eax, ebx
jmp 0x405ac6
dec eax
cmp byte [eax], 0x5c
jne 0x405ac5
mov dword [esp], ebx
inc eax
mov edi, pe_nt_image_headers32
mov dword [esp + 4], eax
call sub.KERNEL32.dll_lstrcpyA
sub esp, 8
mov dword [esp], ebx
call sub.KERNEL32.dll_lstrlenA
mov dl, 0x74
mov cl, 0x78
sub esp, 4
mov byte [eax + ebp - 0x129], dl
mov dl, 0x74
mov byte [eax + ebp - 0x12a], cl
xor ecx, ecx
mov byte [eax + ebp - 0x12b], dl
mov edx, 2
xor eax, eax
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x14], edi
mov edi, 0x40000000
mov dword [esp + 0x10], edx
mov dword [esp + 4], edi
mov dword [esp], ebx
mov ebx, 1
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
call sub.KERNEL32.dll_CreateFileA
mov edi, eax
mov edx, dword [esi + 0x520]
sub esp, 0x1c
mov eax, dword [esi + 0x524]
imul eax, edx
dec eax
jl 0x405c02
lea esi, [esi]
lea edi, [edi]
lea edx, [ebx + 0xfa0]
mov dword [esp + 4], edx
mov eax, dword [esi + 0x66c0]
mov dword [esp], eax
call sub.USER32.dll_GetDlgItem
sub esp, 8
lea edx, [ebp - 0x238]
mov ecx, 0x104
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.USER32.dll_GetWindowTextA
sub esp, 0xc
mov ecx, 0x4121f0
lea eax, [ebp - 0x238]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.KERNEL32.dll_lstrcatA
sub esp, 8
xor ecx, ecx
mov edx, eax
cmp byte [eax], 0
jmp 0x405bc5
inc edx
inc ecx
cmp byte [edx], 0
jne 0x405bc0
mov dword [esp + 8], ecx
xor edx, edx
inc ebx
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x23c]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.KERNEL32.dll_WriteFile
mov ecx, dword [esi + 0x524]
sub esp, 0x14
mov eax, dword [esi + 0x520]
imul ecx, eax
cmp ecx, ebx
jge 0x405b60
mov dword [esp], edi
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x406fb0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ecx, 1
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x14c
mov dword [ebp - 0x144], ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x140], ebx
mov ecx, dword [eax + 0x520]
mov dword [ebp - 0x13c], eax
cmp ecx, 1
jl 0x4070b7
mov edx, dword [eax + 0x524]
lea esi, [esi]
xor esi, esi
cmp edx, 1
mov ebx, 1
jge 0x407067
jmp 0x407098
cmp edx, 2
je 0x407080
mov dword [esp + 4], edi
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.USER32.dll_GetDlgItem
sub esp, 8
lea edx, [ebp - 0x128]
mov ecx, 0xff
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.USER32.dll_GetWindowTextA
sub esp, 0xc
mov ecx, 0x411024
lea eax, [ebp - 0x128]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.KERNEL32.dll_lstrcmpA
sub esp, 8
cmp eax, 1
mov eax, dword [ebp - 0x13c]
adc esi, 0
inc ebx
mov edx, dword [eax + 0x524]
cmp edx, ebx
jl 0x407092
cmp edx, 1
jne 0x407001
mov edi, dword [ebp - 0x144]
add edi, 0x1388
jmp 0x407006
mov edx, dword [ebp - 0x144]
lea edi, [ebx + edx*2 + 0x1386]
jmp 0x407006
mov ecx, dword [eax + 0x520]
xor ebx, ebx
cmp edx, esi
sete bl
inc dword [ebp - 0x144]
add dword [ebp - 0x140], ebx
cmp ecx, dword [ebp - 0x144]
jge 0x406ff0
mov dword [esp + 0xc], ecx
mov eax, str.__d____d
lea ebx, [ebp - 0x138]
mov esi, dword [ebp - 0x140]
mov dword [esp + 4], eax
mov dword [esp], ebx
mov dword [esp + 8], esi
call sub.USER32.dll_wsprintfA
mov dword [esp + 8], ebx
mov edx, dword [ebp - 0x13c]
mov ecx, 0x20
mov dword [esp + 4], ecx
mov edi, dword [edx + 0x68ec]
mov dword [esp], edi
call sub.USER32.dll_SetDlgItemTextA
mov esi, dword [ebp - 0x140]
sub esp, 0xc
test esi, esi
je 0x40715c
mov ebx, dword [ebp - 0x140]
mov edi, 0x1e
mov edx, dword [ebp - 0x140]
mov dword [esp + 4], edi
shl ebx, 6
add ebx, edx
mov edx, dword [ebp - 0x13c]
lea ecx, [edx + ebx*4 + 0x424]
mov dword [esp + 8], ecx
mov ecx, dword [edx + 0x68ec]
mov dword [esp], ecx
call sub.USER32.dll_SetDlgItemTextA
mov edi, dword [ebp - 0x13c]
sub esp, 0xc
mov dword [esp], edi
call fcn.004068c0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x13c]
mov esi, 0x4121fc
mov eax, 0x1e
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov ecx, dword [edx + 0x68ec]
mov dword [esp], ecx
call sub.USER32.dll_SetDlgItemTextA
mov edi, dword [ebp - 0x13c]
sub esp, 0xc
mov dword [esp], edi
call fcn.004068c0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x409bc0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov edx, dword [ebp - 0x10]
mov dword [esp], edx
call sub.KERNEL32.dll_FindResourceA
sub esp, 0xc
mov edi, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_LoadResource
mov dword [ebp - 0x1c], eax
sub esp, 8
test eax, eax
je 0x409cad
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
mov ebx, eax
mov dword [esp + 4], edi
mov esi, dword [ebp - 0x10]
mov dword [esp], esi
call sub.KERNEL32.dll_SizeofResource
sub esp, 8
mov esi, eax
xor ecx, ecx
jmp 0x409c52
movzx eax, byte [ecx + ebx]
mov edx, eax
shr edx, 4
shl al, 4
add al, dl
mov byte [ecx + ebx], al
inc ecx
cmp ecx, esi
jl 0x409c40
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_SizeofResource
mov edi, dword [ebp - 0x18]
sub esp, 8
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x14]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.004098d0
mov esi, dword [ebp - 0x1c]
mov edi, eax
mov dword [esp], esi
call sub.KERNEL32.dll_FreeResource
mov dword [ebp + 8], edi
mov ebx, dword [ebp - 0x18]
sub esp, 4
mov ecx, dword [ebp - 0x14]
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0xc], ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004096a0
mov dword [esp], 0
call sub.KERNEL32.dll_FreeResource
mov edi, dword [ebp - 0x18]
sub esp, 4
mov dword [esp + 0x10], edi
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp + 0xc], edx
mov esi, dword [ebp - 0x10]
mov dword [esp], esi
call fcn.00409ad0
mov dword [ebp + 8], eax
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0xc], ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004096a0
Function at 0x40a820
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x37], 0
jne 0x40a833
cmp dword [esi + 0x2b], 0
je 0x40a841
mov dword [esi + 8], 0x1002
xor esi, esi
jmp 0x40a8ca
mov dword [esi + 8], 0
push 0xa
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
or eax, eax
jne 0x40a865
mov dword [esi + 8], 0x3001
xor esi, esi
jmp 0x40a8ca
push eax
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
pop ecx
or eax, eax
jne 0x40a880
mov dword [esi + 8], 0x3002
xor esi, esi
jmp 0x40a8ca
mov dword [esi + 0x13], eax
mov dword [esi + 0x1b], eax
push ecx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
or eax, eax
jne 0x40a89f
mov dword [esi + 8], 0x3002
xor esi, esi
jmp 0x40a8ca
mov dword [esi + 0x17], eax
mov dword [esi + 0x2b], 2
push esi
call fcn.0040ab90
or eax, eax
jne 0x40a8be
mov dword [esi + 0x2b], 0
xor esi, esi
jmp 0x40a8ca
mov dword [esi + 0x37], 1
mov esi, 1
mov eax, esi
pop esi
leave
ret 0xc

Function at 0x40e780
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x40e7b6
mov dword [0x417c40], eax
mov edx, 0x40e760
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040f000
test eax, eax
sete al
movzx eax, al
mov dword [0x4112b0], eax
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete al
movzx eax, al
mov dword [0x4112b0], eax
leave
ret
Function at 0x40e8a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp - 0xc]
sub esp, 0x68
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov dword [ebp - 0x28], 0x40ca30
mov dword [ebp - 0x24], 0x410638
mov dword [ebp - 0x1c], 0x40e960
mov dword [ebp - 0x18], esp
mov dword [esp], eax
call fcn.0040f420
cmp dword [0x4112b0], 0
mov dword [ebp - 0x44], 0x417c50
je 0x40e940
jl 0x40e980
mov dword [ebp - 0x3c], 1
mov eax, dword [0x417c40]
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x50]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x54]
sub esp, 4
test eax, eax
mov dword [ebp - 0x48], eax
je 0x40ea23
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x44], eax
lea esi, [esi]
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.0040f500
mov eax, dword [ebp - 0x44]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov edx, dword [0x417ca0]
mov eax, 0xffffffff
test edx, edx
je 0x40e99a
mov eax, dword [0x4112b4]
test eax, eax
je 0x40e9da
xor eax, eax
test eax, eax
jne 0x40e9d0
mov edi, dword [0x4112b0]
test edi, edi
js 0x40e9d0
mov dword [ebp - 0x44], 0x417c50
mov ebx, dword [0x4112b0]
test ebx, ebx
je 0x40e940
jmp 0x40e8ee
xor esi, esi
mov dword [0x4112b0], esi
jmp 0x40e9a8
mov dword [esp], 0x4112b8
mov dword [ebp - 0x3c], 1
call sub.KERNEL32.dll_InterlockedIncrement
sub esp, 4
test eax, eax
je 0x40ea61
mov eax, dword [0x4112b4]
test eax, eax
jne 0x40e998
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x3c], 1
call eax
sub esp, 4
mov eax, dword [0x4112b4]
test eax, eax
je 0x40e9fd
jmp 0x40e998
mov dword [esp], 8
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x48], eax
test eax, eax
je 0x40ea55
mov dword [esp + 4], eax
mov eax, dword [0x417c40]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
xor edx, edx
test eax, eax
je 0x40ea8a
test edx, edx
je 0x40ea75
mov dword [ebp - 0x3c], 1
call fcn.0040e300
call fcn.0040e780
mov eax, 1
mov dword [0x4112b4], eax
jmp 0x40e998
mov eax, dword [ebp - 0x48]
mov dword [eax], 0
mov dword [eax + 4], 0
jmp 0x40e936
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
jmp 0x40ea51
Function at 0x40ecf0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov eax, 0x10
mov ebp, esp
push ebx
sub esp, 0x64
and esp, 0xfffffff0
call fcn.0040fe70
call fcn.0040eea0
call sub.KERNEL32.dll_GetCommandLineA
mov ebx, eax
lea eax, [ebp - 0x58]
mov dword [esp], eax
call sub.KERNEL32.dll_GetStartupInfoA
sub esp, 4
test ebx, ebx
jne 0x40ed28
jmp 0x40edc4
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
or eax, edx
test al, 1
jne 0x40ed27
cmp cl, 0x22
je 0x40ed80
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
je 0x40eda0
lea esi, [esi]
lea edi, [edi]
test cl, cl
je 0x40eda0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
setne al
xor edx, edx
cmp cl, 9
setne dl
test eax, edx
jne 0x40ed60
jmp 0x40eda0
inc ebx
movzx ecx, byte [ebx]
cmp cl, 0x22
setne al
xor edx, edx
test cl, cl
setne dl
test eax, edx
jne 0x40ed80
cmp cl, 0x22
je 0x40ee00
lea esi, [esi]
cmp cl, 0x20
sete al
cmp cl, 9
sete dl
jmp 0x40edbe
inc ebx
movzx eax, byte [ebx]
cmp al, 0x20
sete dl
cmp al, 9
sete al
or eax, edx
test al, 1
jne 0x40edb0
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
test byte [ebp - 0x2c], 1
mov edx, 0xa
je 0x40ede2
movzx edx, word [ebp - 0x28]
mov dword [esp + 0xc], edx
xor edx, edx
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00401420
sub esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
inc ebx
movzx ecx, byte [ebx]
jmp 0x40eda0

Function at 0x40f310
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [0x417cf0]
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x40f350
mov dword [ebx + 0x2c], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call fcn.0040f000
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x30], eax
add esp, 0x14
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete al
movzx eax, al
mov dword [ebx + 0x30], eax
add esp, 0x14
pop ebx
pop ebp
ret
Function at 0x40f700
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x417cf0]
mov edi, dword [ebp + 8]
test eax, eax
je 0x40f7dc
mov ecx, dword [eax + 0x30]
test ecx, ecx
js 0x40f7f1
mov edx, dword [eax + 0x30]
test edx, edx
jne 0x40f7b0
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea ebx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
jmp 0x40f748
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
xor ecx, ecx
test eax, eax
mov edx, 5
je 0x40f758
mov ecx, dword [eax + 0x18]
xor edx, edx
cmp edx, 5
je 0x40f7a3
test edx, edx
jne 0x40f796
test ecx, ecx
je 0x40f740
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp], 1
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call ecx
cmp eax, 6
je 0x40f800
cmp eax, 8
je 0x40f740
mov eax, 3
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
mov eax, 5
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x40f732
call fcn.0040f0d0
mov eax, dword [0x417cf0]
mov ecx, dword [eax + 0x30]
test ecx, ecx
jns 0x40f724
call fcn.0040f370
mov eax, dword [0x417cf0]
jmp 0x40f724
mov dword [edi + 0xc], 0
mov eax, dword [ebp - 0x14]
mov edx, ebx
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.0040f670
cmp eax, 7
jne 0x40f79b
mov eax, dword [0x417cf0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40f853
mov edi, dword [eax + 0x30]
test edi, edi
js 0x40f87e
mov esi, dword [eax + 0x30]
test esi, esi
jne 0x40f85f
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.0040f0d0
mov eax, dword [0x417cf0]
jmp 0x40f831
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x40f842
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40f842
call fcn.0040f370
mov eax, dword [0x417cf0]
jmp 0x40f838
Function at 0x40fae0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [0x417cf0]
mov edi, dword [ebp + 8]
test eax, eax
je 0x40fb74
mov esi, dword [eax + 0x30]
test esi, esi
js 0x40fb90
mov ebx, dword [eax + 0x30]
test ebx, ebx
jne 0x40fbb0
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
mov ecx, dword [edi + 0xc]
mov dword [ebp - 0x14], eax
test ecx, ecx
jne 0x40fb68
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.0040f670
cmp eax, 7
jne 0x40fc2f
mov eax, dword [0x417cf0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40fc06
mov edx, dword [eax + 0x30]
test edx, edx
js 0x40fc20
mov edi, dword [eax + 0x30]
test edi, edi
jne 0x40fbe0
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.0040f890
jmp 0x40fb25
call fcn.0040f0d0
mov eax, dword [0x417cf0]
mov esi, dword [eax + 0x30]
test esi, esi
jns 0x40fb00
lea esi, [esi]
call fcn.0040f370
mov eax, dword [0x417cf0]
mov ebx, dword [eax + 0x30]
test ebx, ebx
je 0x40fb0b
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x40fb0e
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x40fb57
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40fb57
call fcn.0040f0d0
mov eax, dword [0x417cf0]
mov edx, dword [eax + 0x30]
test edx, edx
jns 0x40fb49
nop
lea esi, [esi]
call fcn.0040f370
mov eax, dword [0x417cf0]
jmp 0x40fb49
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]
Function at 0x40fc40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov esi, dword [edi + 0xc]
test esi, esi
je 0x40fcd2
mov eax, dword [0x417cf0]
test eax, eax
je 0x40fcc6
mov ebx, dword [eax + 0x30]
test ebx, ebx
js 0x40fd41
mov ecx, dword [eax + 0x30]
test ecx, ecx
jne 0x40fce7
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov eax, edi
call fcn.0040f890
cmp eax, 7
jne 0x40fd5f
mov eax, dword [0x417cf0]
mov ebx, dword [ebp - 0x14]
test eax, eax
je 0x40fd32
mov edx, dword [eax + 0x30]
test edx, edx
js 0x40fd50
mov edi, dword [eax + 0x30]
test edi, edi
jne 0x40fd13
mov dword [eax + 0x28], ebx
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x20]
mov ecx, dword [edx + 4]
mov ebp, dword [eax + 0x20]
mov esp, dword [edx + 8]
jmp ecx
call fcn.0040f0d0
mov eax, dword [0x417cf0]
jmp 0x40fc62
mov dword [esp], edi
call fcn.0040f700
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ebx, dword [eax + 0x2c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
sub esp, 4
jmp 0x40fc77
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x40fcb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40fcb5
call fcn.0040f0d0
mov eax, dword [0x417cf0]
jmp 0x40fca0
call fcn.0040f370
mov eax, dword [0x417cf0]
jmp 0x40fc6d
call fcn.0040f370
mov eax, dword [0x417cf0]
jmp 0x40fcab
call sub.msvcrt.dll_abort
lea esi, [esi]
lea edi, [edi]