Function at 0x440930
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x4b4810]
xor eax, esp
mov dword [esp + 0x110], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
lea esi, [edi + 0x1e4]
push dword [esi]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x440bd7
push esi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x44099b
call fcn.0043b520
lea ecx, [esp + 0x10]
call fcn.0042ef90
mov ebx, dword [esp + 0x10]
sub ebx, dword [edi + 0x128]
mov eax, dword [esp + 0x14]
sbb eax, dword [edi + 0x12c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x100], 0xf
mov dword [esp + 0xfc], 0
test byte [eax], 1
mov byte [esp + 0xec], 0
je 0x440b5b
push dword [esp + 0x34]
lea eax, [esp + 0x24]
mov dword [esp + 0x24], edi
push dword [esp + 0x34]
mov ecx, edi
mov byte [esp + 0x2c], 0
push eax
call fcn.00441150
mov edx, eax
test edx, edx
je 0x440a34
sub ebx, dword [edx]
mov eax, dword [esp + 0x10]
sbb eax, dword [edx + 4]
mov dword [edx + 0x14], eax
mov dword [edx + 0x10], ebx
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
neg ecx
mov dword [edx + 0x18], ecx
adc eax, 0
neg eax
mov dword [edx + 0x1c], eax
mov eax, dword [edi + 0x16c]
test al, 8
je 0x440ac3
push edx
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
push 0x45
lea eax, [esp + 0x110]
push eax
call fcn.00440450
mov ebx, eax
lea eax, [esp + 0xec]
cmp eax, ebx
je 0x440aaa
cmp dword [esp + 0x100], 0x10
jb 0x440a7f
push dword [esp + 0xec]
call fcn.0048f211
add esp, 4
push ebx
lea ecx, [esp + 0xf0]
mov dword [esp + 0x104], 0xf
mov dword [esp + 0x100], 0
mov byte [esp + 0xf0], 0
call fcn.004197e0
cmp dword [esp + 0x118], 0x10
jb 0x440ac3
push dword [esp + 0x104]
call fcn.0048f211
add esp, 4
cmp byte [esp + 0x24], 0
je 0x440ad4
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0xfc], 0
je 0x440b5b
cmp dword [0x4ba12c], 2
jg 0x440b49
mov ebx, 2
lea ecx, [esp + 0x40]
push 1
push ebx
mov dword [esp + 0x40], ebx
call fcn.0041ee10
mov dword [esp + 0xdc], 0x413c78
mov dword [esp + 0xe0], 0x864
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x864
push 0x413c78
lea ecx, [esp + 0x40]
mov dword [esp + 0xec], eax
call fcn.0041fd20
lea eax, [esp + 0xec]
push eax
lea eax, [esp + 0x44]
push eax
call fcn.0041b3b0
add esp, 8
jmp 0x440b4d
mov ebx, dword [esp + 0x2c]
test bl, 2
je 0x440b5b
lea ecx, [esp + 0x38]
call fcn.0041faa0
mov ebx, dword [esp + 0xc]
test byte [ebx], 4
je 0x440b8d
mov eax, dword [edi + 0x40]
test eax, eax
je 0x440b8d
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x44]
push ebx
push 0x45
push dword [esp + 0x44]
push dword [esp + 0x44]
call eax
add esp, 0x30
cmp dword [esp + 0x100], 0x10
jb 0x440ba6
push dword [esp + 0xec]
call fcn.0048f211
add esp, 4
push 0
push dword [esi]
mov dword [esp + 0x108], 0xf
mov dword [esp + 0x104], 0
mov byte [esp + 0xf4], 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x440bd7
call fcn.0043b520
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00492f61
mov esp, ebp
pop ebp
ret 0x10