Function at 0x427a80
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 0x427ae9
mov ecx, str.:memory:
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x427ad1
test dl, dl
je 0x427acd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x427ad1
add eax, 2
add ecx, 2
test dl, dl
jne 0x427ab1
xor eax, eax
jmp 0x427ad6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x427ae9
mov dword [esp + 0x10], 0
mov ebx, 1
jmp 0x427af2
mov ebx, 1
mov dword [esp + 0x10], ebx
cmp dword [0x4f019c], 0
je 0x427b08
cmp dword [0x4f01a8], 0
jg 0x427c56
push 0xc
call fcn.0049dacb
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x427b40
add dword [0x4f01a8], ebx
mov dword [0x4f019c], ebx
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0049b315
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 [0x4f01ac], eax
jne 0x427b7e
add dword [0x4f01a8], ebx
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
sub dword [0x4f01a8], ebx
mov dword [0x4efe48], eax
cmp eax, 0xffffffff
je 0x427b96
mov dword [0x4f01ac], ebx
jmp 0x427b83
mov eax, dword [0x4efe48]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x427b96
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x427ba2
mov dword [esp + 0x18], 0x4d44fc
mov edi, dword [esp + 0x18]
cmp byte [edi + 4], 0
je 0x427c15
mov eax, dword [esp + 0x14]
test eax, eax
je 0x427c15
cmp dword [esp + 0x10], 0
jne 0x427c15
call fcn.00435180
mov ebx, eax
test ebx, ebx
je 0x427c4d
mov edi, dword [edi + 8]
test edi, edi
je 0x427c07
lea ecx, [ecx]
mov eax, dword [edi]
mov edx, dword [eax + 0x4c]
mov ecx, ebx
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x427bf7
test al, al
je 0x427bf3
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x427bf7
add ecx, 2
add edx, 2
test al, al
jne 0x427bd7
xor eax, eax
jmp 0x427bfc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x427c70
mov edi, dword [edi + 0x44]
test edi, edi
jne 0x427bd0
push ebx
call fcn.0049b3dd
add esp, 4
mov ebx, 1
cmp dword [0x4f019c], 0
je 0x427c27
cmp dword [0x4f01a8], 0
jg 0x427c43
push 0x48
call fcn.0049dacb
mov edi, eax
add esp, 4
test edi, edi
jne 0x427c9c
add dword [0x4f01a8], ebx
mov dword [0x4f019c], ebx
mov edx, dword [esp + 0xc]
mov dword [edx], 0
push esi
call fcn.0049b3dd
add esp, 4
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0049b315
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.0049b3dd
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0049b315
mov esp, ebp
pop ebp
ret
push 0x48
push 0
push edi
call fcn.004a2b10
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
push eax
mov edx, edi
call fcn.00446af0
mov ebx, eax
xor ecx, ecx
add esp, 4
cmp ebx, ecx
je 0x427d07
mov eax, dword [edi]
cmp eax, ecx
je 0x427cd4
mov esi, eax
call fcn.00447150
mov esi, dword [esp + 0x1c]
push edi
call fcn.0049b3dd
add esp, 4
push esi
call fcn.0049b3dd
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.0049b315
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], edi
mov edx, dword [edi]
mov dword [edx + 0xac], 0x427a20
mov eax, dword [edi]
mov dword [eax + 0xb0], 0x427a50
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.004a2b10
add esp, 0xc
cmp byte [esi + 0x11], 0
jne 0x427d6e
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 0x427dd2
mov ecx, 0x8000
cmp ax, cx
ja 0x427dd2
movzx eax, ax
lea edx, [eax - 1]
test eax, edx
jne 0x427dd2
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.004269d0
test eax, eax
setne al
mov byte [edi + 0x12], al
jmp 0x427dfa
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 0x427df8
cmp dword [esp + 0x10], 0
jne 0x427df8
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 0x427e11
mov dword [ecx + 0x30], eax
mov eax, dword [esp + 0x18]
cmp byte [eax + 4], 0
je 0x427e37
cmp dword [esp + 0x14], 0
je 0x427e37
cmp dword [esp + 0x10], 0
jne 0x427e37
mov ecx, dword [eax + 8]
mov dword [edi + 0x44], ecx
call fcn.00426950
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.0049b315
mov esp, ebp
pop ebp
ret