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

Disassembly:
push 0xffffffffffffffff
push 0x4c255d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov eax, dword [0x4ffbf8]
push ebx
push ebp
push esi
mov ebp, ecx
xor ebx, ebx
xor esi, esi
cmp eax, 0xffffffff
push edi
mov dword [esp + 0x18], ebp
je 0x45a900
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
cmp esi, ebx
jne 0x45a900
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x24], eax
cmp eax, ebx
mov dword [esp + 0x3c], ebx
je 0x45a899
mov ecx, eax
call fcn.00457230
mov esi, eax
jmp 0x45a89b
xor esi, esi
mov eax, dword [0x4ffbf8]
push esi
push eax
mov dword [esp + 0x44], 0xffffffff
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x45a8cd
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x1c]
push 0x4e2f88
push ecx
mov dword [esp + 0x24], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov edi, eax
push 0x4ffc00
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [edi + 4], edx
mov dword [0x4ffbfc], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
inc dword [esi + 4]
mov esi, dword [esp + 0x48]
mov dword [ebp], ebx
mov edi, 1
mov eax, dword [esi + 0x10]
mov dword [esp + 0x3c], edi
cmp eax, ebx
je 0x45a9e5
mov dword [ebp], 7
mov eax, dword [0x4ffbf8]
or esi, 0xffffffff
xor edi, edi
cmp eax, esi
mov dword [esp + 0x3c], esi
je 0x45a9d7
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
cmp edi, ebx
jne 0x45a9d7
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x48], eax
cmp eax, ebx
mov dword [esp + 0x3c], 2
je 0x45a974
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45a976
xor edi, edi
mov eax, dword [0x4ffbf8]
push edi
push eax
mov dword [esp + 0x44], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x45a9a4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x48]
push 0x4e2f88
push ecx
mov dword [esp + 0x50], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], edx
mov dword [0x4ffbfc], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
xor eax, eax
jmp 0x45ac79
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
cdq
mov ebp, eax
xor eax, eax
mov ax, word [esi + 0xe]
xor ebp, edx
imul eax, ecx
add eax, 0x1f
sub ebp, edx
cdq
and edx, 0x1f
mov dword [esp + 0x20], ebp
add eax, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x48], eax
mov eax, ebp
imul eax, ecx
lea eax, [eax + eax*2]
push eax
push 0x42
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x45aa36
mov ecx, dword [esp + 0x18]
mov dword [ecx], edi
jmp 0x45aae2
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
cmp eax, ebx
mov dword [esp + 0x24], eax
jne 0x45aa5c
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push eax
mov dword [edx], edi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov dword [esp + 0x14], ebx
jmp 0x45aad7
mov eax, dword [esi + 8]
cmp eax, ebx
jle 0x45aa66
lea ebx, [eax - 1]
mov edi, ebx
mov edx, dword [esp + 0x44]
imul edi, dword [esp + 0x48]
add edi, edx
sub ebp, ebx
test eax, eax
jle 0x45aa82
xor eax, eax
test ebx, ebx
setl al
jmp 0x45aa89
cmp ebx, dword [esp + 0x20]
sbb eax, eax
inc eax
test eax, eax
jne 0x45aad0
mov edx, dword [esp + 0x4c]
mov ax, word [esi + 0xe]
mov ecx, dword [esi + 4]
push edx
push eax
lea eax, [ebp - 1]
imul eax, ecx
push ecx
mov ecx, dword [esp + 0x30]
lea edx, [ecx + eax*2]
mov ecx, dword [esp + 0x24]
add eax, edx
push eax
push edi
call fcn.0045b630
mov eax, dword [esi + 8]
test eax, eax
jle 0x45aac6
mov ecx, dword [esp + 0x48]
dec ebx
inc ebp
sub edi, ecx
jmp 0x45aa75
mov ecx, dword [esp + 0x48]
inc ebx
dec ebp
add edi, ecx
jmp 0x45aa75
xor ebx, ebx
mov edi, 1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
mov eax, dword [0x4ffbf8]
or ebp, 0xffffffff
xor esi, esi
cmp eax, ebp
mov dword [esp + 0x3c], ebp
je 0x45ac6e
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
cmp esi, ebx
jne 0x45ac6e
push 0xb8
call fcn.004b2d7a
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
cmp esi, ebx
mov dword [esp + 0x3c], 3
je 0x45ac0a
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esi + 0x34]
call fcn.00457370
lea edx, [esp + 0x44]
lea ecx, [esi + 0x44]
push edx
mov byte [esp + 0x40], 4
call fcn.00457370
lea eax, [esp + 0x4c]
lea ecx, [esi + 0x88]
push eax
mov byte [esp + 0x40], 5
call fcn.00457370
lea ecx, [esp + 0x13]
mov byte [esp + 0x3c], 6
push ecx
lea ecx, [esi + 0x98]
call fcn.00457370
mov byte [esp + 0x28], 0
mov word [esp + 0x2a], bx
mov eax, dword [esp + 0x28]
lea edx, [esi + 0x28]
mov word [esp + 0x2c], bx
mov word [esp + 0x2e], bx
mov ecx, dword [esp + 0x2c]
mov dword [edx], eax
mov dword [esi + 0x20], 0x33333333
mov dword [esi], ebx
mov dword [edx + 4], ecx
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 [edx + 8], bx
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], 0
mov dword [esi + 0xb4], ebx
jmp 0x45ac0c
xor esi, esi
mov edx, dword [0x4ffbf8]
push esi
push edx
mov dword [esp + 0x44], ebp
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x45ac3b
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push 0x4e2f88
push eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov edi, eax
push 0x4ffc00
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ecx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [edi + 4], ecx
mov dword [0x4ffbfc], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esi + 4]
dec eax
mov dword [esi + 4], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x30
ret 0xc