Function at 0x461fc0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1f], 0
je 0x462183
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
sub ax, 4
jae 0x462183
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
sub ax, 2
jb 0x462002
sub ax, 2
jb 0x462023
jmp 0x462049
mov eax, dword [ebp - 4]
movzx ebx, word [eax + 8]
mov eax, ebx
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0x40]
cdq
idiv ecx
mov dword [ebp - 0xc], eax
mov eax, ebx
cdq
idiv ecx
mov dword [ebp - 0x10], edx
mov edi, ecx
jmp 0x462055
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0xa]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x3c]
mov eax, dword [ebp - 0xc]
cdq
idiv ebx
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
cdq
idiv ebx
mov dword [ebp - 0xc], eax
mov edi, ebx
jmp 0x462055
xor edi, edi
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x14], eax
test edi, edi
jle 0x462103
call fcn.00407808
mov ebx, eax
mov esi, ebx
sub esi, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
cmp esi, dword [eax + 0x20]
jae 0x462084
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
sub eax, esi
push eax
call sub.KERNEL32.DLL_TlsSetValue
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
sub ax, 1
jb 0x4620a2
je 0x4620b5
dec ax
je 0x4620c8
dec ax
je 0x4620db
jmp 0x4620ec
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
sub edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp 0x4620ec
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp 0x4620ec
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
sub edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp 0x4620ec
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.00462338
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [eax]
call dword [edx + 0x8c]
dec edi
test edi, edi
jg 0x462062
cmp dword [ebp - 0x10], 0
jle case.default.0x462193
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
sub ax, 1
jb 0x46212b
je 0x462141
dec ax
je 0x462157
dec ax
je 0x46216d
jmp case.default.0x462193
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov eax, dword [ebp - 8]
movsx eax, word [eax + 4]
cmp eax, 7
ja case.default.0x462193
jmp dword [eax*4 + 0x46219a]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
sub edx, eax
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 8]
add edx, eax
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
xor ecx, ecx
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.00461ec8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xc]
sub edx, eax
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
xor ecx, ecx
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.00461ec8
mov edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0x7fff
jle 0x462253
push ebp
call fcn.00461f60
pop ecx
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov edx, dword [ebp - 8]
movsx edx, word [edx + 6]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1d], 0
je case.default.0x462193
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0x7fff
jle 0x46228c
push ebp
call fcn.00461f60
pop ecx
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov edx, dword [ebp - 8]
movsx edx, word [edx + 6]
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00462338
jmp case.default.0x462193
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
call fcn.00462338
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret