Function at 0x45dcf0
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c282f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x490
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
mov edi, ecx
cmp eax, ebx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], edi
jne 0x45dd2e
mov dword [edi], 5
jmp 0x45dedf
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
push 0x4f16e4
push eax
mov dword [ecx], ebx
mov dword [edx], ebx
mov dword [edi], ebx
call fcn.0049b78d
mov esi, eax
add esp, 8
cmp esi, ebx
mov dword [ebp - 0x24], esi
jne 0x45dd5c
mov dword [edi], 2
jmp 0x45dedf
push esi
mov edi, 1
push 0xe
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0049b95b
add esp, 0x10
cmp eax, 0xe
je 0x45dd87
mov ecx, dword [ebp - 0x14]
mov dword [ecx], 3
jmp 0x45ded6
cmp byte [ebp - 0xa0], 0x42
jne 0x45decd
cmp byte [ebp - 0x9f], 0x4d
jne 0x45decd
push esi
push 0x28
lea edx, [ebp - 0x5c]
push edi
push edx
call fcn.0049b95b
add esp, 0x10
cmp eax, 0x28
je 0x45ddc4
mov eax, dword [ebp - 0x14]
mov dword [eax], 3
jmp 0x45ded6
cmp dword [ebp - 0x58], ebx
jg 0x45ddd3
mov ecx, dword [ebp - 0x14]
mov dword [ecx], ebx
jmp 0x45ded6
mov eax, dword [ebp - 0x4c]
cmp eax, ebx
je 0x45de2f
cmp eax, 2
jne 0x45dde6
cmp word [ebp - 0x4e], 4
je 0x45ddf1
cmp eax, edi
jne 0x45de21
cmp word [ebp - 0x4e], 8
jne 0x45de21
push esi
call fcn.0049b6df
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
add esp, 4
push edx
push eax
push ecx
mov ecx, dword [ebp - 0x14]
call fcn.0045e6c0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp - 0x14]
mov dword [edx], 6
jmp 0x45ded6
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
jne 0x45de42
mov ecx, dword [ebp - 0x4e]
mov eax, edi
shl eax, cl
mov dword [ebp - 0x3c], eax
jmp 0x45de45
mov ecx, dword [ebp - 0x4e]
cmp eax, 0x100
jbe 0x45de51
xor eax, eax
mov dword [ebp - 0x3c], eax
cmp cx, 0x1f
jbe 0x45de5c
xor eax, eax
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x96]
and ecx, 0xffff
dec ecx
mov dword [ebp + 8], edx
cmp ecx, 0x1f
ja case.0x45de7d.7
xor edx, edx
mov dl, byte [ecx + 0x45e660]
jmp dword [edx*4 + 0x45e644]
shl eax, 2
push esi
push eax
lea ecx, [ebp - 0x4a0]
push edi
push ecx
call fcn.0049b95b
mov edx, dword [ebp - 0x3c]
add esp, 0x10
lea ecx, [edx*4]
cmp eax, ecx
je case.0x45de7d.5
mov edx, dword [ebp - 0x14]
mov dword [edx], 3
jmp 0x45ded6
mov eax, dword [ebp + 8]
push ebx
push eax
push esi
call fcn.0049ba72
add esp, 0xc
test eax, eax
je 0x45def4
push esi
call fcn.0049b6df
add esp, 4
mov ecx, dword [ebp - 0x14]
mov dword [ecx], 6
push esi
call fcn.0049b6df
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x54]
mov dword [edx], ecx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
lea edx, [ecx + ecx*2]
imul ecx, eax
mov dword [ebp - 0x2c], edx
lea eax, [ecx + ecx*2]
push eax
push 0x42
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
jne 0x45df49
mov ecx, dword [ebp - 0x14]
push esi
mov dword [ecx], edi
call fcn.0049b6df
mov eax, dword [ebp - 0x1c]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
cmp eax, ebx
mov dword [ebp + 0xc], eax
jne 0x45df64
mov eax, dword [ebp - 0x14]
mov dword [eax], edi
jmp 0x45e60c
mov ecx, dword [ebp - 0x4e]
xor eax, eax
and ecx, 0xffff
lea esi, [ecx - 1]
cmp esi, 0x1f
ja case.0x45df7f.7
xor edx, edx
mov dl, byte [esi + 0x45e69c]
jmp dword [edx*4 + 0x45e680]
mov eax, dword [ebp - 0x58]
shl eax, 2
jmp case.0x45df7f.7
mov eax, dword [ebp - 0x58]
lea eax, [eax + eax*2]
jmp case.0x45df7f.7
mov ecx, dword [ebp - 0x58]
lea eax, [ecx + ecx]
jmp case.0x45df7f.7
mov eax, dword [ebp - 0x58]
jmp case.0x45df7f.7
mov edx, dword [ebp - 0x58]
lea eax, [edx + 1]
cdq
sub eax, edx
sar eax, 1
jmp case.0x45df7f.7
mov eax, dword [ebp - 0x58]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
lea eax, [eax*8 + 0x1f]
mov dword [ebp - 4], ebx
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
push eax
mov dword [ebp - 0x30], eax
call fcn.004b2d7a
add esp, 4
mov dword [ebp + 0x10], eax
jmp 0x45dffa
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], 0xffffffff
cmp eax, ebx
jne 0x45e027
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x1c]
push esi
mov dword [ecx], edi
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov edx, dword [ebp - 0x24]
push edx
jmp 0x45ded7
mov ecx, dword [ebp - 0x54]
cmp ecx, ebx
jle 0x45e033
lea esi, [ecx - 1]
jmp 0x45e035
xor esi, esi
mov eax, ecx
mov dword [ebp + 8], esi
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov eax, esi
imul eax, dword [ebp - 0x2c]
add eax, edx
mov dword [ebp - 0x28], eax
cmp ecx, ebx
jle 0x45e05d
xor eax, eax
cmp esi, ebx
setl al
jmp 0x45e067
mov ecx, dword [ebp - 0x34]
xor eax, eax
cmp esi, ecx
setge al
cmp eax, ebx
jne 0x45e5fd
mov ecx, dword [0x4ffbf8]
xor eax, eax
cmp ecx, 0xffffffff
je 0x45e210
push ecx
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
cmp eax, ebx
jne 0x45e20a
push 0xb8
call fcn.004b2d7a
mov esi, eax
add esp, 4
mov dword [ebp - 0x18], esi
cmp esi, ebx
mov dword [ebp - 4], 2
je 0x45e18c
mov al, byte [ebp + 0xc]
mov dword [esi + 0x38], ebx
mov byte [esi + 0x34], al
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
mov cl, byte [ebp + 0xc]
mov dword [esi + 0x48], ebx
mov byte [esi + 0x44], cl
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x50], ebx
mov dl, byte [ebp + 0xc]
mov dword [esi + 0x8c], ebx
mov byte [esi + 0x88], dl
mov dword [esi + 0x90], ebx
mov dword [esi + 0x94], ebx
lea eax, [ebp + 0xc]
lea ecx, [esi + 0x98]
push eax
mov byte [ebp - 4], 5
call fcn.00457370
mov byte [ebp - 0x68], bl
mov word [ebp - 0x66], bx
mov edx, dword [ebp - 0x68]
lea ecx, [esi + 0x28]
mov word [ebp - 0x64], bx
mov word [ebp - 0x62], bx
mov dword [ecx], edx
mov edx, dword [ebp - 0x64]
xor ax, ax
mov dword [esi + 0x20], 0x33333333
mov dword [ecx + 4], edx
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x24], 0x40073333
mov word [ecx + 8], ax
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
mov dword [esi + 0x68], edi
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], edi
mov dword [esi + 0x78], ebx
mov dword [esi + 0x7c], edi
mov dword [esi + 0x80], edi
mov dword [esi + 0x84], ebx
mov dword [esi + 0xa8], ebx
mov dword [esi + 0xac], ebx
mov byte [esi + 0xb0], bl
mov dword [esi + 0xb4], ebx
jmp 0x45e18e
xor esi, esi
mov eax, dword [0x4ffbf8]
push esi
push eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x45e1c6
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [ebp - 0x8c]
push 0x4e2f88
push ecx
mov dword [ebp - 0x8c], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov dword [ebp - 0x20], eax
mov dword [eax], esi
push 0x4ffc00
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [ebp - 0x20]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [eax + 4], edx
mov dword [0x4ffbfc], eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov ecx, dword [0x4ffbf8]
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp + 8]
jmp 0x45e210
mov ecx, dword [0x4ffbf8]
cmp dword [eax + 4], edi
jne 0x45e542
xor eax, eax
cmp ecx, 0xffffffff
je 0x45e3a8
push ecx
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
cmp eax, ebx
jne 0x45e3a2
push 0xb8
call fcn.004b2d7a
add esp, 4
cmp eax, ebx
je 0x45e32b
mov cl, byte [ebp + 0xc]
mov dl, byte [ebp + 0xc]
mov byte [eax + 0x34], cl
mov cl, byte [ebp + 0xc]
mov dword [eax + 0x38], ebx
mov dword [eax + 0x3c], ebx
mov dword [eax + 0x40], ebx
mov byte [eax + 0x44], dl
mov dl, byte [ebp + 0xc]
mov dword [eax + 0x48], ebx
mov dword [eax + 0x4c], ebx
mov dword [eax + 0x50], ebx
mov byte [eax + 0x88], cl
mov dword [eax + 0x8c], ebx
mov dword [eax + 0x90], ebx
mov dword [eax + 0x94], ebx
mov byte [eax + 0x98], dl
mov byte [ebp - 0x74], bl
mov word [ebp - 0x72], bx
mov edx, dword [ebp - 0x74]
lea ecx, [eax + 0x28]
mov dword [eax + 0x9c], ebx
mov dword [eax + 0xa0], ebx
mov dword [eax + 0xa4], ebx
mov word [ebp - 0x70], bx
mov word [ebp - 0x6e], bx
mov dword [ecx], edx
mov edx, dword [ebp - 0x70]
mov dword [eax + 0x20], 0x33333333
mov dword [eax], ebx
mov dword [ecx + 4], edx
mov dword [eax + 4], ebx
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], edi
mov dword [eax + 0x18], edi
mov dword [eax + 0x1c], ebx
mov dword [eax + 0x24], 0x40073333
mov word [ecx + 8], bx
mov dword [eax + 0x54], edi
mov dword [eax + 0x58], edi
mov dword [eax + 0x5c], edi
mov dword [eax + 0x60], edi
mov dword [eax + 0x64], edi
mov dword [eax + 0x68], edi
mov dword [eax + 0x6c], ebx
mov dword [eax + 0x70], edi
mov dword [eax + 0x74], edi
mov dword [eax + 0x78], ebx
mov dword [eax + 0x7c], edi
mov dword [eax + 0x80], edi
mov dword [eax + 0x84], ebx
mov dword [eax + 0xa8], ebx
mov dword [eax + 0xac], ebx
mov byte [eax + 0xb0], bl
mov dword [eax + 0xb4], ebx
mov esi, eax
jmp 0x45e32d
xor esi, esi
mov eax, dword [0x4ffbf8]
push esi
push eax
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x45e35e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [ebp - 0x84]
push 0x4e2f88
push ecx
mov dword [ebp - 0x84], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [eax], esi
push 0x4ffc00
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [ebp - 0x18]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [eax + 4], edx
mov dword [0x4ffbfc], eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov ecx, dword [0x4ffbf8]
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp + 8]
jmp 0x45e3a8
mov ecx, dword [0x4ffbf8]
cmp dword [eax], ebx
je 0x45e542
xor eax, eax
cmp ecx, 0xffffffff
je 0x45e531
push ecx
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
cmp eax, ebx
jne 0x45e531
push 0xb8
call fcn.004b2d7a
add esp, 4
cmp eax, ebx
je 0x45e4c2
mov cl, byte [ebp + 0xc]
mov dl, byte [ebp + 0xc]
mov byte [eax + 0x34], cl
mov cl, byte [ebp + 0xc]
mov dword [eax + 0x38], ebx
mov dword [eax + 0x3c], ebx
mov dword [eax + 0x40], ebx
mov byte [eax + 0x44], dl
mov dl, byte [ebp + 0xc]
mov dword [eax + 0x48], ebx
mov dword [eax + 0x4c], ebx
mov dword [eax + 0x50], ebx
mov byte [eax + 0x88], cl
mov dword [eax + 0x8c], ebx
mov dword [eax + 0x90], ebx
mov dword [eax + 0x94], ebx
mov byte [eax + 0x98], dl
mov byte [ebp - 0x80], bl
mov word [ebp - 0x7e], bx
mov edx, dword [ebp - 0x80]
lea ecx, [eax + 0x28]
mov dword [eax + 0x9c], ebx
mov dword [eax + 0xa0], ebx
mov dword [eax + 0xa4], ebx
mov word [ebp - 0x7c], bx
mov word [ebp - 0x7a], bx
mov dword [ecx], edx
mov edx, dword [ebp - 0x7c]
mov dword [eax + 0x20], 0x33333333
mov dword [eax], ebx
mov dword [ecx + 4], edx
mov dword [eax + 4], ebx
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], edi
mov dword [eax + 0x18], edi
mov dword [eax + 0x1c], ebx
mov dword [eax + 0x24], 0x40073333
mov word [ecx + 8], bx
mov dword [eax + 0x54], edi
mov dword [eax + 0x58], edi
mov dword [eax + 0x5c], edi
mov dword [eax + 0x60], edi
mov dword [eax + 0x64], edi
mov dword [eax + 0x68], edi
mov dword [eax + 0x6c], ebx
mov dword [eax + 0x70], edi
mov dword [eax + 0x74], edi
mov dword [eax + 0x78], ebx
mov dword [eax + 0x7c], edi
mov dword [eax + 0x80], edi
mov dword [eax + 0x84], ebx
mov dword [eax + 0xa8], ebx
mov dword [eax + 0xac], ebx
mov byte [eax + 0xb0], bl
mov dword [eax + 0xb4], ebx
mov esi, eax
jmp 0x45e4c4
xor esi, esi
mov eax, dword [0x4ffbf8]
push esi
push eax
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x45e4f5
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [ebp - 0x90]
push 0x4e2f88
push ecx
mov dword [ebp - 0x90], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [eax], esi
push 0x4ffc00
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [ebp - 0x18]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [eax + 4], edx
mov dword [0x4ffbfc], eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x34]
push ecx
sub ecx, esi
dec ecx
push ecx
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x45e544
xor eax, eax
cmp eax, ebx
jne 0x45e5c3
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp + 0x10]
push eax
push ecx
push edi
push edx
call fcn.0049b95b
mov ecx, dword [ebp - 0x30]
add esp, 0x10
cmp eax, ecx
jne 0x45e5ce
lea ecx, [ebp - 0x88]
call fcn.0045bd30
mov ecx, dword [ebp - 0x4e]
mov edx, dword [ebp - 0x58]
lea eax, [ebp - 0x4a0]
and ecx, 0xffff
push eax
mov eax, dword [ebp - 0x28]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push eax
push ecx
lea ecx, [ebp - 0x88]
call fcn.0045b630
mov ecx, dword [ebp - 0x54]
cmp ecx, ebx
jle 0x45e5af
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
dec esi
sub eax, edx
mov dword [ebp + 8], esi
jmp 0x45e04d
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
inc esi
add edx, eax
mov dword [ebp + 8], esi
mov dword [ebp - 0x28], edx
jmp 0x45e050
mov ecx, dword [ebp - 0x14]
mov dword [ecx], 0xe
jmp 0x45e5d7
mov ecx, dword [ebp - 0x14]
mov dword [ecx], 3
mov esi, dword [ebp - 0x1c]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov edx, dword [ebp + 0x10]
push edx
call fcn.004b2da3
mov eax, dword [ebp - 0x24]
add esp, 4
push eax
jmp 0x45ded7
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.004b2da3
mov esi, dword [ebp - 0x24]
add esp, 4
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push esi
call fcn.0049b6df
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
add esp, 4
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x14]
mov dword [eax], 6
jmp 0x45ded6