Function at 0x455750
Capabilities:
Generate random numbers via winapi
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 8
mov eax, dword [0x49d094]
mov esi, ecx
test eax, eax
je 0x4556e9
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x45563f
cmp dword [eax + 4], 0
mov edi, eax
jne 0x4556e4
mov eax, dword [0x49d094]
test eax, eax
je 0x45570a
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x455726
mov edi, eax
test eax, eax
jne 0x4556a2
mov eax, dword [0x4b9b38]
movzx eax, byte [eax]
push 4
push 0xc
call fcn.00402eb0
add esp, 8
test eax, eax
je 0x455743
mov dword [eax], 0x49d094
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x49d094]
test eax, eax
je 0x455731
dec eax
push edi
push eax
call sub.KERNEL32.dll_TlsSetValue
test esi, esi
je 0x4556b7
mov eax, dword [esi]
mov dword [esi], 0
test eax, eax
je 0x4556b9
mov eax, dword [esi + 4]
jmp 0x4556b9
xor eax, eax
mov edx, dword [edi + 4]
mov ecx, dword [edi + 8]
test edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], ecx
mov dword [edi + 4], 1
mov dword [edi + 8], eax
je 0x4556e4
test ecx, ecx
je 0x4556e4
lock dec dword [ecx]
jne 0x4556e4
lea ecx, [ebp - 0xc]
call fcn.0040c6d0
add edi, 8
jmp 0x455728
push 0x49d094
call fcn.0044af70
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x455633
jmp 0x45563f
push 0x49d094
call fcn.0044af70
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x45565c
xor edi, edi
mov eax, edi
add esp, 8
pop esi
pop edi
pop ebp
ret
push 0x49d094
call fcn.0044af70
add esp, 4
jmp 0x45569b
push 0xc
push 4
call fcn.00471180
nop dword [eax]
push ebp
mov ebp, esp
push esi
and esp, 0xfffffff0
sub esp, 0x30
mov eax, dword [0x49d0a4]
test eax, eax
je 0x45584c
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jb 0x455780
mov esi, eax
mov eax, dword [eax]
or eax, dword [esi + 4]
jne 0x455847
mov eax, dword [0x49d0a4]
test eax, eax
je 0x45586d
dec eax
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
je 0x455889
mov esi, eax
test eax, eax
jne 0x4557ea
mov eax, dword [0x4b9b38]
movzx eax, byte [eax]
push 8
push 0x20
call fcn.00402eb0
add esp, 8
test eax, eax
je 0x4558a5
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 0x18], 0x49d0a4
mov esi, eax
mov eax, dword [0x49d0a4]
test eax, eax
je 0x455893
dec eax
push esi
push eax
call sub.KERNEL32.dll_TlsSetValue
mov eax, dword [ebp + 8]
test eax, eax
je 0x455809
mov ecx, dword [eax]
movups xmm0, xmmword [eax + 8]
mov dword [eax + 4], 0
mov dword [eax], 0
cmp ecx, 1
je 0x455836
xorps xmm0, xmm0
mov eax, esp
movaps xmmword [esp], xmm0
push 2
push 0x10
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
js 0x455828
movaps xmm0, xmmword [esp]
jmp 0x455836
lea ecx, [esp + 0x10]
call fcn.0044a040
movups xmm0, xmmword [esp + 0x10]
mov dword [esi + 4], 0
mov dword [esi], 1
movups xmmword [esi + 8], xmm0
add esi, 8
jmp 0x45588b
push 0x49d0a4
call fcn.0044af70
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 2
jae 0x455773
jmp 0x455780
push 0x49d0a4
call fcn.0044af70
add esp, 4
push eax
call sub.KERNEL32.dll_TlsGetValue
cmp eax, 1
jne 0x45579d
xor esi, esi
mov eax, esi
lea esp, [ebp - 4]
pop esi
pop ebp
ret
push 0x49d0a4
call fcn.0044af70
add esp, 4
jmp 0x4557e3
push 0x20
push 8
call fcn.00471180
nop