Function at 0x42f670
Capabilities:
Allocate thread local storage
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
mov eax, dword [0x4eb6b8]
xor eax, esp
mov dword [esp + 0x80], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ecx
test eax, eax
je 0x42f6d9
mov ecx, str.:memory:
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x42f6c1
test dl, dl
je 0x42f6bd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x42f6c1
add eax, 2
add ecx, 2
test dl, dl
jne 0x42f6a1
xor eax, eax
jmp 0x42f6c6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x42f6d9
mov dword [esp + 0x10], 0
mov ebx, 1
jmp 0x42f6e2
mov ebx, 1
mov dword [esp + 0x10], ebx
cmp dword [0x4f0384], 0
je 0x42f6f8
cmp dword [0x4f0390], 0
jg 0x42f846
push 0xc
call fcn.0049d400
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x42f730
add dword [0x4f0390], ebx
mov dword [0x4f0384], ebx
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0049ca6b
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov byte [esi + 8], al
mov dword [esi], edx
cmp dword [0x4f0394], eax
jne 0x42f76e
add dword [0x4f0390], ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x4f0390], ebx
mov dword [0x4f0030], eax
cmp eax, 0xffffffff
je 0x42f786
mov dword [0x4f0394], ebx
jmp 0x42f773
mov eax, dword [0x4f0030]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x42f786
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x42f792
mov dword [esp + 0x18], 0x4d5704
mov edi, dword [esp + 0x18]
cmp byte [edi + 4], 0
je 0x42f805
mov eax, dword [esp + 0x14]
test eax, eax
je 0x42f805
cmp dword [esp + 0x10], 0
jne 0x42f805
call fcn.0043cce0
mov ebx, eax
test ebx, ebx
je 0x42f83d
mov edi, dword [edi + 8]
test edi, edi
je 0x42f7f7
lea ecx, [ecx]
mov eax, dword [edi]
mov edx, dword [eax + 0x4c]
mov ecx, ebx
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x42f7e7
test al, al
je 0x42f7e3
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x42f7e7
add ecx, 2
add edx, 2
test al, al
jne 0x42f7c7
xor eax, eax
jmp 0x42f7ec
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x42f860
mov edi, dword [edi + 0x44]
test edi, edi
jne 0x42f7c0
push ebx
call fcn.0049cbfd
add esp, 4
mov ebx, 1
cmp dword [0x4f0384], 0
je 0x42f817
cmp dword [0x4f0390], 0
jg 0x42f833
push 0x48
call fcn.0049d400
mov edi, eax
add esp, 4
test edi, edi
jne 0x42f88c
add dword [0x4f0390], ebx
mov dword [0x4f0384], ebx
mov edx, dword [esp + 0xc]
mov dword [edx], 0
push esi
call fcn.0049cbfd
add esp, 4
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0049ca6b
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xc]
mov dword [esi + 4], edi
mov dword [ecx], esi
inc dword [edi + 0x30]
push ebx
call fcn.0049cbfd
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0049ca6b
mov esp, ebp
pop ebp
ret
push 0x48
push 0
push edi
call fcn.004a4260
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
push eax
mov edx, edi
call fcn.0044e660
mov ebx, eax
xor ecx, ecx
add esp, 4
cmp ebx, ecx
je 0x42f8f7
mov eax, dword [edi]
cmp eax, ecx
je 0x42f8c4
mov esi, eax
call fcn.0044ecc0
mov esi, dword [esp + 0x1c]
push edi
call fcn.0049cbfd
add esp, 4
push esi
call fcn.0049cbfd
mov ecx, dword [esp + 0x10]
add esp, 4
mov dword [ecx], 0
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0049ca6b
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], edi
mov edx, dword [edi]
mov dword [edx + 0xac], 0x42f610
mov eax, dword [edi]
mov dword [eax + 0xb0], 0x42f640
mov esi, dword [edi]
push 0x64
mov dword [edi + 4], ecx
mov dword [edi + 8], ecx
mov cl, byte [esi + 0xd]
lea edx, [esp + 0x24]
push 0
push edx
mov byte [edi + 0xd], cl
call fcn.004a4260
add esp, 0xc
cmp byte [esi + 0x11], 0
jne 0x42f95e
mov eax, dword [esi + 0x58]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
push 0
push 0
push eax
call edx
mov esi, dword [esi + 0x58]
mov eax, dword [esi]
mov edx, dword [eax + 8]
add esp, 0xc
push 0x64
lea ecx, [esp + 0x24]
push ecx
push esi
call edx
add esp, 0xc
movzx eax, byte [esp + 0x30]
movzx ecx, byte [esp + 0x31]
shl ax, 8
or ax, cx
mov edx, 0x200
mov word [edi + 0x14], ax
cmp ax, dx
jb 0x42f9c2
mov ecx, 0x8000
cmp ax, cx
ja 0x42f9c2
movzx eax, ax
lea edx, [eax - 1]
test eax, edx
jne 0x42f9c2
mov al, byte [esp + 0x35]
movzx esi, byte [esp + 0x34]
mov byte [edi + 0xe], al
mov cl, byte [esp + 0x36]
mov byte [edi + 0xf], cl
mov dl, byte [esp + 0x37]
lea ecx, [esp + 0x54]
mov byte [edi + 0x10], dl
mov byte [edi + 0x11], 1
call fcn.0042e5c0
test eax, eax
setne al
mov byte [edi + 0x12], al
jmp 0x42f9ea
cmp dword [esp + 0x14], 0
mov ecx, 0x400
mov al, 0x20
mov word [edi + 0x14], cx
mov word [edi + 0xe], 0x2040
mov byte [edi + 0x10], al
je 0x42f9e8
cmp dword [esp + 0x10], 0
jne 0x42f9e8
mov byte [edi + 0x12], 0
xor esi, esi
movzx eax, word [edi + 0x14]
mov ecx, dword [edi]
mov edx, eax
sub edx, esi
mov word [edi + 0x16], dx
cmp byte [ecx + 0x11], 0
jne 0x42fa01
mov dword [ecx + 0x30], eax
mov eax, dword [esp + 0x18]
cmp byte [eax + 4], 0
je 0x42fa27
cmp dword [esp + 0x14], 0
je 0x42fa27
cmp dword [esp + 0x10], 0
jne 0x42fa27
mov ecx, dword [eax + 8]
mov dword [edi + 0x44], ecx
call fcn.0042e540
mov dword [eax + 8], edi
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x8c]
mov dword [edi + 0x30], 1
pop edi
pop esi
pop ebx
mov dword [eax], edx
xor ecx, esp
xor eax, eax
call fcn.0049ca6b
mov esp, ebp
pop ebp
ret