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

Disassembly:
push 0xffffffffffffffff
push 0x4c27ea
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x4ffbf8
mov dword [esp + 0x5c], esi
mov dword [esi], 0
call fcn.00457460
mov edx, dword [eax + 4]
add eax, 4
inc edx
mov dword [eax], edx
mov eax, dword [esp + 0x78]
mov dword [esp + 0x70], 0
test eax, eax
je 0x45d406
mov ecx, dword [esp + 0x84]
test ecx, ecx
jne 0x45d42e
mov ecx, 0x4ffbf8
mov dword [esi], 5
mov dword [esp + 0x70], 0xffffffff
call fcn.00457460
mov ecx, dword [eax + 4]
add eax, 4
dec ecx
mov dword [eax], ecx
xor eax, eax
jmp 0x45daf2
cmp ecx, eax
jne 0x45d505
mov dword [esi], 5
mov eax, dword [0x4ffbf8]
or edi, 0xffffffff
xor esi, esi
cmp eax, edi
mov dword [esp + 0x70], edi
je 0x45d4f7
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x45d4f7
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x90], eax
test eax, eax
mov dword [esp + 0x70], 1
je 0x45d48e
mov ecx, eax
call fcn.00457230
mov esi, eax
jmp 0x45d490
xor esi, esi
mov eax, dword [0x4ffbf8]
push esi
push eax
mov dword [esp + 0x78], edi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45d4c4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x90]
push 0x4e2f88
push ecx
mov dword [esp + 0x98], 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]
mov eax, dword [esi + 4]
dec eax
mov dword [esi + 4], eax
xor eax, eax
jmp 0x45daf2
fld qword [esp + 0x98]
fcomp qword [0x4c7098]
fnstsw ax
test ah, 1
jne 0x45d52f
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0x3ff00000
fld qword [0x4c70a0]
fcomp qword [esp + 0x98]
fnstsw ax
test ah, 0x41
jne 0x45d559
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
mov eax, dword [esp + 0x7c]
mov esi, dword [esp + 0x90]
fld qword [0x4c7098]
fsub qword [esp + 0x98]
xor edx, edx
lea ecx, [eax + eax*2]
test esi, esi
setle dl
fstp qword [esp + 0x60]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x88]
dec edx
and edx, esi
lea edi, [ecx + ecx*2]
cmp edx, eax
mov dword [esp + 0x58], edi
mov dword [esp + 0x10], edx
jl 0x45d5a2
mov dword [esp + 0x10], eax
mov edx, eax
add ecx, esi
xor ebx, ebx
test ecx, ecx
setle bl
dec ebx
and ecx, ebx
cmp ecx, eax
mov dword [esp + 0x14], ecx
jl 0x45d5ba
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x94]
xor eax, eax
test esi, esi
mov ecx, dword [esp + 0x80]
setle al
dec eax
and eax, esi
mov ebp, eax
cmp ebp, ecx
mov dword [esp + 0x18], ebp
jl 0x45d5e2
mov dword [esp + 0x18], ecx
mov ebp, ecx
mov eax, dword [esp + 0x8c]
xor ebx, ebx
add eax, esi
test eax, eax
setle bl
dec ebx
and ebx, eax
cmp ebx, ecx
mov dword [esp + 0x94], ebx
jl 0x45d609
mov dword [esp + 0x94], ecx
mov ebx, ecx
mov eax, dword [esp + 0xa0]
xor ecx, ecx
mov cl, ah
mov dword [esp + 0x80], ebp
shr eax, 0x10
cmp ebp, ebx
mov byte [esp + 0x7c], cl
mov byte [esp + 0x88], al
jae 0x45da2b
mov ebx, ebp
imul ebp, edi
imul ebx, dword [esp + 0x24]
imul edi, esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x28], edi
jmp 0x45d662
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x8c]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x90]
sub ebp, edi
cmp edx, eax
jae 0x45d7a8
lea ecx, [ecx + ecx*2]
lea edi, [edx + edx*2]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x78]
add ecx, ebx
sub eax, edx
mov dword [esp + 0x20], eax
lea esi, [ecx + edi + 2]
mov edx, dword [esp + 0x84]
mov ebx, dword [esp + 0x2c]
mov ecx, edi
sub ecx, ebx
mov bl, byte [esi]
lea eax, [edx + ebp]
mov dl, byte [esi - 1]
add eax, ecx
mov cl, byte [esi - 2]
mov byte [esp + 0x38], cl
mov byte [esp + 0x40], dl
mov cl, byte [eax]
mov dl, byte [eax + 1]
mov al, byte [eax + 2]
mov byte [esp + 0x48], bl
mov bl, byte [esp + 0xa0]
mov byte [esp + 0x30], cl
cmp cl, bl
mov byte [esp + 0x3c], dl
mov byte [esp + 0x44], al
jne 0x45d6eb
cmp dl, byte [esp + 0x7c]
jne 0x45d6eb
cmp al, byte [esp + 0x88]
je 0x45d793
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x38]
and eax, 0xff
and ecx, 0xff
mov dword [esp + 0x34], eax
fild dword [esp + 0x34]
mov dword [esp + 0x34], ecx
fmul qword [esp + 0x98]
fild dword [esp + 0x34]
fmul qword [esp + 0x60]
faddp st(1)
call fcn.004989f0
mov edx, dword [esp + 0x3c]
mov byte [esi - 2], al
mov eax, dword [esp + 0x40]
and edx, 0xff
mov dword [esp + 0x34], edx
and eax, 0xff
fild dword [esp + 0x34]
mov dword [esp + 0x34], eax
fmul qword [esp + 0x98]
fild dword [esp + 0x34]
fmul qword [esp + 0x60]
faddp st(1)
call fcn.004989f0
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
and ecx, 0xff
and edx, 0xff
mov dword [esp + 0x34], ecx
mov byte [esi - 1], al
fild dword [esp + 0x34]
mov dword [esp + 0x34], edx
fmul qword [esp + 0x98]
fild dword [esp + 0x34]
fmul qword [esp + 0x60]
faddp st(1)
call fcn.004989f0
mov byte [esi], al
mov eax, dword [esp + 0x20]
add edi, 3
add esi, 3
dec eax
mov dword [esp + 0x20], eax
jne 0x45d691
mov eax, dword [0x4ffbf8]
xor edi, edi
cmp eax, 0xffffffff
je 0x45d862
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45d85d
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
mov byte [esp + 0x70], 2
je 0x45d7ee
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45d7f0
xor edi, edi
mov eax, dword [0x4ffbf8]
push edi
push eax
mov byte [esp + 0x78], 0
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45d81f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x4c]
push 0x4e2f88
push ecx
mov dword [esp + 0x54], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
mov ebp, dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call ebp
mov edx, dword [0x4ffbfc]
mov ebx, dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov dword [esi + 4], edx
push 0x4ffc00
mov dword [0x4ffbfc], esi
call ebx
mov eax, dword [0x4ffbf8]
jmp 0x45d86e
mov eax, dword [0x4ffbf8]
mov ebp, dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ebx, dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
cmp dword [edi + 4], 1
jne 0x45d9e1
xor edi, edi
cmp eax, 0xffffffff
je 0x45d91a
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45d915
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
mov byte [esp + 0x70], 3
je 0x45d8b9
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45d8bb
xor edi, edi
mov eax, dword [0x4ffbf8]
push edi
push eax
mov byte [esp + 0x78], 0
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45d8ea
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x50]
push 0x4e2f88
push ecx
mov dword [esp + 0x58], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call ebp
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], edx
mov dword [0x4ffbfc], esi
call ebx
mov eax, dword [0x4ffbf8]
cmp dword [edi], 0
je 0x45d9e1
xor edi, edi
cmp eax, 0xffffffff
je 0x45d9c0
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45d9c0
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
mov byte [esp + 0x70], 4
je 0x45d964
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45d966
xor edi, edi
mov eax, dword [0x4ffbf8]
push edi
push eax
mov byte [esp + 0x78], 0
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45d995
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x54]
push 0x4e2f88
push ecx
mov dword [esp + 0x5c], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call ebp
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], edx
mov dword [0x4ffbfc], esi
call ebx
mov ecx, dword [esp + 0x94]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x80]
sub ecx, eax
sub edx, eax
push ecx
push edx
call dword [edi]
neg eax
sbb eax, eax
inc eax
jmp 0x45d9e3
xor eax, eax
test eax, eax
jne 0x45db07
mov ecx, dword [esp + 0x58]
mov edi, dword [esp + 0x8c]
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x1c]
add edi, ecx
mov ecx, dword [esp + 0x94]
inc eax
add esi, edx
cmp eax, ecx
mov dword [esp + 0x80], eax
mov dword [esp + 0x8c], edi
mov dword [esp + 0x1c], esi
jb 0x45d64f
mov eax, dword [0x4ffbf8]
or esi, 0xffffffff
xor edi, edi
cmp eax, esi
mov dword [esp + 0x70], esi
je 0x45dae6
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45dae6
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x90], eax
test eax, eax
mov dword [esp + 0x70], 6
je 0x45da7d
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45da7f
xor edi, edi
mov ecx, dword [0x4ffbf8]
push edi
push ecx
mov dword [esp + 0x78], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45dab4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edx, [esp + 0x90]
push 0x4e2f88
push edx
mov dword [esp + 0x98], 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 eax, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], eax
mov dword [0x4ffbfc], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
mov eax, 1
mov ecx, dword [esp + 0x68]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x64
ret 0x2c
mov eax, dword [esp + 0x5c]
or esi, 0xffffffff
xor edi, edi
mov dword [esp + 0x70], esi
mov dword [eax], 0xe
mov eax, dword [0x4ffbf8]
cmp eax, esi
je 0x45dbc4
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45dbc4
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x90], eax
test eax, eax
mov dword [esp + 0x70], 5
je 0x45db63
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45db65
xor edi, edi
mov ecx, dword [0x4ffbf8]
push edi
push ecx
mov dword [esp + 0x78], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45db9a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edx, [esp + 0x90]
push 0x4e2f88
push edx
mov dword [esp + 0x98], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call ebp
mov eax, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], eax
mov dword [0x4ffbfc], esi
call ebx
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
xor eax, eax
jmp 0x45daf2